Message ID | 1331121854-20494-12-git-send-email-amit.virdi@st.com |
---|---|
State | Accepted |
Commit | 0b7ff3f4595f751ca796456f536c50cae498351d |
Delegated to: | Stefan Roese |
Headers | show |
On Wednesday 07 March 2012 13:04:00 Amit Virdi wrote: > flash reading is required earlier than flash_init is called since the > env_init is called before flash_init. This makes the smi_init necessary > before env_init being called. > > Signed-off-by: Amit Virdi <amit.virdi@st.com> Acked-by: Stefan Roese <sr@denx.de> Thanks, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de
diff --git a/board/spear/common/spr_misc.c b/board/spear/common/spr_misc.c index e2918ff..043c72a 100644 --- a/board/spear/common/spr_misc.c +++ b/board/spear/common/spr_misc.c @@ -25,6 +25,7 @@ #include <command.h> #include <i2c.h> #include <net.h> +#include <linux/mtd/st_smi.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_emi.h> @@ -54,6 +55,13 @@ void dram_init_banksize(void) gd->bd->bi_dram[0].size = gd->ram_size; } +int board_early_init_f() +{ +#if defined(CONFIG_ST_SMI) + smi_init(); +#endif + return 0; +} int misc_init_r(void) { #if defined(CONFIG_CMD_NET) diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index bdfda9d..66cf19d 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -194,6 +194,7 @@ /* Miscellaneous configurable options */ #define CONFIG_ARCH_CPU_INIT +#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_DISPLAY_CPUINFO #define CONFIG_BOOT_PARAMS_ADDR 0x00000100 #define CONFIG_CMDLINE_TAG 1
flash reading is required earlier than flash_init is called since the env_init is called before flash_init. This makes the smi_init necessary before env_init being called. Signed-off-by: Amit Virdi <amit.virdi@st.com> --- board/spear/common/spr_misc.c | 8 ++++++++ include/configs/spear-common.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-)