summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-08-14 12:26:08 -0700
committerTom Rini <trini@ti.com>2012-09-27 09:49:59 -0700
commitd7cb93b28a41237b689c9d84230d7d72a2048021 (patch)
tree9edbde2af8df4105db86940df089ba0b6d4d64b3
parentd4c4e0e11710f26904c288ad1bf05d8b73abddf7 (diff)
ARM: SPL: Move gpmc_init() to spl_board_init()
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>
-rw-r--r--arch/arm/cpu/armv7/omap-common/boot-common.c7
-rw-r--r--arch/arm/cpu/armv7/omap-common/spl_nand.c1
-rw-r--r--arch/arm/cpu/armv7/omap3/board.c3
-rw-r--r--include/configs/am3517_crane.h1
-rw-r--r--include/configs/am3517_evm.h1
-rw-r--r--include/configs/mcx.h1
-rw-r--r--include/configs/tam3517-common.h1
7 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 3406cfbbef8..ed398fdec74 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -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()) {
diff --git a/arch/arm/cpu/armv7/omap-common/spl_nand.c b/arch/arm/cpu/armv7/omap-common/spl_nand.c
index 3e2f3590e69..1e6b5f0db95 100644
--- a/arch/arm/cpu/armv7/omap-common/spl_nand.c
+++ b/arch/arm/cpu/armv7/omap-common/spl_nand.c
@@ -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 */
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 3d74f09b0c7..52196c8f66e 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -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
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index f24b44d5e8c..254ed576c7e 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -314,6 +314,7 @@
/* 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 */
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 95f8d788540..ca39c72b181 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -313,6 +313,7 @@
/* 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 */
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 733022e7856..a841c7037c9 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -359,6 +359,7 @@
/* Defines for SPL */
#define CONFIG_SPL
+#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_NAND_SIMPLE
#define CONFIG_SPL_NAND_SOFTECC
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index a13fd937621..b34cb78a364 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -239,6 +239,7 @@
/* 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