ARM: SPL: Move gpmc_init() to spl_board_init()
authorTom Rini <trini@ti.com>
Tue, 14 Aug 2012 19:26:08 +0000 (12:26 -0700)
committerTom Rini <trini@ti.com>
Thu, 27 Sep 2012 16:49:59 +0000 (09:49 -0700)
This is an OMAP/related-specific function, move calling it to
spl_board_init() and turn on CONFIG_SPL_BOARD_INIT on the boards that
enabled NAND and didn't enable this already.

Signed-off-by: Tom Rini <trini@ti.com>
arch/arm/cpu/armv7/omap-common/boot-common.c
arch/arm/cpu/armv7/omap-common/spl_nand.c
arch/arm/cpu/armv7/omap3/board.c
include/configs/am3517_crane.h
include/configs/am3517_evm.h
include/configs/mcx.h
include/configs/tam3517-common.h

index 3406cfbbef826e268f7b5bc2d957dfa33c3657d7..ed398fdec743ef8fc49bbfdbd80f9e68a31aa4ff 100644 (file)
@@ -49,6 +49,13 @@ u32 spl_boot_mode(void)
        return omap_bootmode;
 }
 
+void spl_board_init(void)
+{
+#ifdef CONFIG_SPL_NAND_SUPPORT
+       gpmc_init();
+#endif
+}
+
 int board_mmc_init(bd_t *bis)
 {
        switch (spl_boot_device()) {
index 3e2f3590e69112484a41c235ecb946d2cda8eaa8..1e6b5f0db9516f18c8159d4b717945ffa4021c01 100644 (file)
@@ -35,7 +35,6 @@ void spl_nand_load_image(void)
        int *dst __attribute__((unused));
 
        debug("spl: nand - using hw ecc\n");
-       gpmc_init();
        nand_init();
 
        /*use CONFIG_SYS_TEXT_BASE as temporary storage area */
index 3d74f09b0c758ca559b40d73f0eeff2aac8f40e5..52196c8f66e91be062d6aa55383c6cb0a8a99c4e 100644 (file)
@@ -106,6 +106,9 @@ int board_mmc_init(bd_t *bis)
 
 void spl_board_init(void)
 {
+#ifdef CONFIG_SPL_NAND_SUPPORT
+       gpmc_init();
+#endif
 #ifdef CONFIG_SPL_I2C_SUPPORT
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #endif
index f24b44d5e8ce6c25bac83d18e5c9f8ea50c85a05..254ed576c7e448a2ba452196183d1353d0b68a93 100644 (file)
 
 /* Defines for SPL */
 #define CONFIG_SPL
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE           0x40200800
 #define CONFIG_SPL_MAX_SIZE            (54 * 1024)     /* 8 KB for stack */
index 95f8d7885405e6bd917ba3f93ac148379ffa87dc..ca39c72b181dfefe6ece0d75471efa6fe8813f3a 100644 (file)
 
 /* Defines for SPL */
 #define CONFIG_SPL
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE           0x40200800
 #define CONFIG_SPL_MAX_SIZE            (54 * 1024)     /* 8 KB for stack */
index 733022e78566de795c63fef640467930366a88b9..a841c7037c9ee7a18b1e8f4ae7966e7163933aa7 100644 (file)
 
 /* Defines for SPL */
 #define CONFIG_SPL
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_NAND_SOFTECC
 
index a13fd937621f5516b2dfa072053b919d9ae4b17b..b34cb78a3640c26e986af5b3eb2da8f5f0d1cfd0 100644 (file)
 
 /* Defines for SPL */
 #define CONFIG_SPL
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_CONSOLE
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_NAND_SOFTECC