summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-01-25 23:24:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-02-04 15:52:41 +0100
commit86db57509cff77348414d75df68fab6f3b95e60a (patch)
tree634674de018f8d69da2258fad6b573abc1798e7d /arch/arm/cpu
parentfbf7653ea7208830f839beb0fb1d13e272a860db (diff)
downloadbarebox-86db57509cff77348414d75df68fab6f3b95e60a.tar.gz
barebox-86db57509cff77348414d75df68fab6f3b95e60a.tar.xz
ARM start: pickup parameters from pbl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/start.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 4966ab62e3..9fd1e8d5f2 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -26,32 +26,21 @@
#include <asm/cache.h>
#include <memory.h>
-/*
- * First function in the uncompressed image. We get here from
- * the pbl.
- */
-void __naked __section(.text_entry) start(void)
+static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
+ uint32_t boarddata)
{
-#ifdef CONFIG_PBL_IMAGE
- board_init_lowlevel_return();
-#else
- barebox_arm_head();
-#endif
-}
-
-/*
- * Board code can jump here by either returning from board_init_lowlevel
- * or by calling this function directly.
- */
-void __naked __noreturn board_init_lowlevel_return(void)
-{
- arm_setup_stack(STACK_BASE + STACK_SIZE - 16);
-
setup_c();
start_barebox();
}
+#ifndef CONFIG_PBL_IMAGE
+
+void __naked __section(.text_entry) start(void)
+{
+ barebox_arm_head();
+}
+
/*
* Main ARM entry point in the uncompressed image. Call this with the memory
* region you can spare for barebox. This doesn't necessarily have to be the
@@ -62,5 +51,18 @@ void __naked __noreturn board_init_lowlevel_return(void)
void __naked __noreturn barebox_arm_entry(uint32_t membase, uint32_t memsize,
uint32_t boarddata)
{
- board_init_lowlevel_return();
+ arm_setup_stack(STACK_BASE + STACK_SIZE - 16);
+
+ __start(membase, memsize, boarddata);
}
+#else
+/*
+ * First function in the uncompressed image. We get here from
+ * the pbl. The stack already has been set up by the pbl.
+ */
+void __naked __section(.text_entry) start(uint32_t membase, uint32_t memsize,
+ uint32_t boarddata)
+{
+ __start(membase, memsize, boarddata);
+}
+#endif