diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-12 15:33:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-13 14:17:31 +0200 |
commit | 8b609af14c7be5388faf5d7a66914946471534e5 (patch) | |
tree | 63ac04be3230cc46df9628cc1c1bacfc9548dc54 /arch/arm/include | |
parent | 1dbfd5ed82fd2b6b0ba6df98e2e23aaf3cd1a197 (diff) | |
download | barebox-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/include')
-rw-r--r-- | arch/arm/include/asm/common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h index f3a87c81c9..133bb8e1f6 100644 --- a/arch/arm/include/asm/common.h +++ b/arch/arm/include/asm/common.h @@ -16,4 +16,9 @@ static inline unsigned long get_pc(void) return pc; } +static inline void arm_setup_stack(unsigned long top) +{ + __asm__ __volatile__("mov sp, %0" : : "r"(top)); +} + #endif /* __ASM_ARM_COMMON_H */ |