[PATCH 02/10] nios: initialize malloc pool before start_barebox()

Sascha Hauer s.hauer at pengutronix.de
Sat Mar 9 05:53:03 EST 2013


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/nios2/cpu/start.S | 4 ++--
 arch/nios2/lib/board.c | 8 ++------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S
index 42520d7..41f65ff 100644
--- a/arch/nios2/cpu/start.S
+++ b/arch/nios2/cpu/start.S
@@ -150,8 +150,8 @@ _reloc:
 	/*
 	 * Call board_init -- never returns
 	 */
-	movhi   r4, %hi(start_barebox at h)
-	ori     r4, r4, %lo(start_barebox at h)
+	movhi   r4, %hi(nios_start_barebox at h)
+	ori     r4, r4, %lo(nios_start_barebox at h)
 	callr   r4
 
 	/* NEVER RETURNS -- but branch to the _start just
diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
index 624a4f8..7c4dc76 100644
--- a/arch/nios2/lib/board.c
+++ b/arch/nios2/lib/board.c
@@ -18,23 +18,19 @@
 
 #include <common.h>
 #include <malloc.h>
-#include <init.h>
 #include <memory.h>
 #include <asm-generic/memory_layout.h>
 #include <cache.h>
 
-int altera_mem_malloc_init(void)
+void __noreturn nios_start_barebox(void)
 {
 
 	mem_malloc_init((void *)(NIOS_SOPC_TEXT_BASE - MALLOC_SIZE),
 			(void *)(NIOS_SOPC_TEXT_BASE - 1));
 
-	return 0;
+	start_barebox();
 }
 
-core_initcall(altera_mem_malloc_init);
-
 void arch_shutdown(void)
 {
 }
-
-- 
1.8.2.rc2




More information about the barebox mailing list