summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-06-25 10:08:51 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-26 18:21:03 +0200
commitdc7d63b3cc0a50c810e8214bf8a4f59c2b132f04 (patch)
tree483a12f12b29e6d3b11116493757baea6c41cd41 /arch/arm/include
parent74ea37084b1ea423f53e24293d4662e2947b4a1f (diff)
downloadbarebox-dc7d63b3cc0a50c810e8214bf8a4f59c2b132f04.tar.gz
barebox-dc7d63b3cc0a50c810e8214bf8a4f59c2b132f04.tar.xz
ARM: split barebox_arm_head in two separate functions
This adds a new function __barebox_arm_head() which defines an the regular barebox ARM header, but which jumps to the end of the function so that this can be embedded into another function. barebox_arm_head() now just uses it and jumps to barebox_arm_reset_vector just like it did before. This makes it possible to define board specific entry points. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/barebox-arm-head.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index 9a8cc87716..af7164a2eb 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -43,7 +43,7 @@ static inline void arm_cpu_lowlevel_init(void)
#ifdef CONFIG_HAVE_MACH_ARM_HEAD
#include <mach/barebox-arm-head.h>
#else
-static inline void barebox_arm_head(void)
+static inline void __barebox_arm_head(void)
{
__asm__ __volatile__ (
#ifdef CONFIG_THUMB2_BAREBOX
@@ -52,12 +52,12 @@ static inline void barebox_arm_head(void)
"bx r9\n"
".thumb\n"
"1:\n"
- "bl barebox_arm_reset_vector\n"
+ "bl 2f\n"
".rept 10\n"
"1: b 1b\n"
".endr\n"
#else
- "b barebox_arm_reset_vector\n"
+ "b 2f\n"
"1: b 1b\n"
"1: b 1b\n"
"1: b 1b\n"
@@ -74,6 +74,14 @@ static inline void barebox_arm_head(void)
".rept 8\n"
".word 0x55555555\n"
".endr\n"
+ "2:\n"
+ );
+}
+static inline void barebox_arm_head(void)
+{
+ __barebox_arm_head();
+ __asm__ __volatile__ (
+ "b barebox_arm_reset_vector\n"
);
}
#endif