[U-Boot] [PATCH 1/2] spl_atmel.c: Switch s_init to board_init_f

Tom Rini trini at ti.com
Wed Feb 11 01:07:22 CET 2015


To facilitate changing lowlevel_init to become s_init, move the current
contents of s_init into board_init_f and add the rest of what
board_init_f does here.

Cc: Bo Shen <voice.shen at atmel.com>
Cc: Andreas Bießmann <andreas.devel at googlemail.com>
Tested-by: Matt Porter <mporter at konsulko.com> on sama5d3_xplained
Signed-off-by: Tom Rini <trini at ti.com>
---
 arch/arm/cpu/at91-common/spl_atmel.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/at91-common/spl_atmel.c b/arch/arm/cpu/at91-common/spl_atmel.c
index 7297530..d815050 100644
--- a/arch/arm/cpu/at91-common/spl_atmel.c
+++ b/arch/arm/cpu/at91-common/spl_atmel.c
@@ -58,7 +58,7 @@ static void switch_to_main_crystal_osc(void)
 	writel(tmp, &pmc->mor);
 }
 
-void s_init(void)
+void board_init_f(ulong dummy)
 {
 	switch_to_main_crystal_osc();
 
@@ -77,4 +77,9 @@ void s_init(void)
 	preloader_console_init();
 
 	mem_init();
+
+	/* Clear the BSS. */
+	memset(__bss_start, 0, __bss_end - __bss_start);
+
+	board_init_r(NULL, 0);
 }
-- 
1.7.9.5



More information about the U-Boot mailing list