SPEAr: Initialize SNOR in early_board_init_f
authorAmit Virdi <amit.virdi@st.com>
Mon, 7 May 2012 07:36:49 +0000 (13:06 +0530)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 7 Jul 2012 12:07:41 +0000 (14:07 +0200)
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>
Signed-off-by: Stefan Roese <sr@denx.de>
board/spear/common/spr_misc.c
include/configs/spear-common.h

index e2918ff40560c0f18efe18d989fea454079f800d..043c72a05d3496b5ee19d6a013965b66c7743f20 100644 (file)
@@ -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)
index cf09090ab17a5df090c6a435d9754a4483408479..c2dff8b45dddebdf8fd11e6f313f6c8d3c8a4921 100644 (file)
 
 /* 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