summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/start-pbl.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-12 15:33:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-13 14:17:31 +0200
commit8b609af14c7be5388faf5d7a66914946471534e5 (patch)
tree63ac04be3230cc46df9628cc1c1bacfc9548dc54 /arch/arm/cpu/start-pbl.c
parent1dbfd5ed82fd2b6b0ba6df98e2e23aaf3cd1a197 (diff)
downloadbarebox-8b609af14c7be5388faf5d7a66914946471534e5.tar.gz
barebox-8b609af14c7be5388faf5d7a66914946471534e5.tar.xz
ARM: introduce arm_setup_stack function and use it
We have enough places which setup0 a stack to justify a static inline function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/start-pbl.c')
-rw-r--r--arch/arm/cpu/start-pbl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index 0467dfe832..929cc26055 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -178,8 +178,7 @@ void __naked board_init_lowlevel_return(void)
uint32_t pg_start, pg_end, pg_len;
/* Setup the stack */
- r = STACK_BASE + STACK_SIZE - 16;
- __asm__ __volatile__("mov sp, %0" : : "r"(r));
+ arm_setup_stack(STACK_BASE + STACK_SIZE - 16);
/* Get offset between linked address and runtime address */
offset = get_runtime_offset();