]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/samsung/common/board.c
dm: exynos: Convert SPI to driver model
[karo-tx-uboot.git] / board / samsung / common / board.c
index 3d1cf437faab31e1159307c619661948c4738cb1..e1fc123fcc4ea154cd4e189460a8afb3e1713399 100644 (file)
 #include <tmu.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <asm/gpio.h>
 #include <asm/arch/board.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/dwmmc.h>
-#include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
+#include <asm/arch/system.h>
 #include <power/pmic.h>
 #include <asm/arch/sromc.h>
 #include <lcd.h>
@@ -86,9 +87,6 @@ int board_init(void)
        boot_temp_check();
 #endif
 
-#ifdef CONFIG_EXYNOS_SPI
-       spi_init();
-#endif
        return exynos_init();
 }
 
@@ -149,6 +147,21 @@ int board_early_init_f(void)
 #ifdef CONFIG_SYS_I2C_INIT_BOARD
        board_i2c_init(gd->fdt_blob);
 #endif
+
+#if defined(CONFIG_OF_CONTROL) && defined(CONFIG_EXYNOS_FB)
+/*
+ * board_init_f(arch/arm/lib/board.c) calls lcd_setmem() which needs
+ * panel_info.vl_col, panel_info.vl_row and panel_info.vl_bpix, to reserve
+ * FB memory at a very early stage. So, we need to fill panel_info.vl_col,
+ * panel_info.vl_row and panel_info.vl_bpix before lcd_setmem() is called.
+ */
+       err = exynos_lcd_early_init(gd->fdt_blob);
+       if (err) {
+               debug("LCD early init failed\n");
+               return err;
+       }
+#endif
+
        return exynos_early_init_f();
 }
 #endif