Skip to contentSkip to conversation

arm: socfpga: Do not call board_init_r() from board_init_f()

PATCH New Marek Vasut 1 participant 2 messages Aug 29, 2015 – Sep 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: Do not call board_init_r() from board_init_f()

Instead of calling board_init_r() directly from board_init_f(), just return from board_init_f(). This will make the code continue executing in crt0.S _main(), from which the board_init_r() is called. This patch aligns the SoCFPGA SPL with the correct SPL design as well as reduces the stack utilisation slightly.

---
 arch/arm/mach-socfpga/spl.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-socfpga/spl.c +0 -2
index 13ec24b..775a827 100644
@@ -180,6 +180,4 @@ void board_init_f(ulong dummy)
 
 	/* Configure simple malloc base pointer into RAM. */
 	gd->malloc_base = CONFIG_SYS_TEXT_BASE + (1024 * 1024);
-
-	board_init_r(NULL, 0);
 }
Signature · 1 line
2.1.4
author Applied
#1 lore raw

PATCH 1/1 arm: socfpga: Do not call board_init_r() from board_init_f()

Quoted 8 lines · Marek Vasut

Instead of calling board_init_r() directly from board_init_f(), just return from board_init_f(). This will make the code continue executing in crt0.S _main(), from which the board_init_r() is called. This patch aligns the SoCFPGA SPL with the correct SPL design as well as reduces the stack utilisation slightly.

Applied, this is needed.

Best regards,
Marek Vasut