summaryrefslogtreecommitdiffstats
path: root/arch/nios2
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-03-07 12:54:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-14 08:41:20 +0100
commitbb80d9cd22b27d97fda2257a6dcdef1c3b67bfc7 (patch)
treec37998a24ef6f99e1a6fe72cb4dc8d610b0e9ddd /arch/nios2
parente91c960a5ea9e9a516b81dad0fa79ae1164d72a5 (diff)
downloadbarebox-bb80d9cd22b27d97fda2257a6dcdef1c3b67bfc7.tar.gz
nios: initialize malloc pool before start_barebox()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/cpu/start.S4
-rw-r--r--arch/nios2/lib/board.c8
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@h)
- ori r4, r4, %lo(start_barebox@h)
+ movhi r4, %hi(nios_start_barebox@h)
+ ori r4, r4, %lo(nios_start_barebox@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)
{
}
-