From: Amit Virdi Date: Mon, 7 May 2012 07:36:49 +0000 (+0530) Subject: SPEAr: Initialize SNOR in early_board_init_f X-Git-Tag: v2012.07-rc1~11^2~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b7ff3f4595f751ca796456f536c50cae498351d;p=u-boot SPEAr: Initialize SNOR in early_board_init_f 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 Acked-by: Stefan Roese Signed-off-by: Stefan Roese --- diff --git a/board/spear/common/spr_misc.c b/board/spear/common/spr_misc.c index e2918ff405..043c72a05d 100644 --- a/board/spear/common/spr_misc.c +++ b/board/spear/common/spr_misc.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -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 cf09090ab1..c2dff8b45d 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -198,6 +198,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