summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2012-09-24 10:18:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-27 19:30:04 +0200
commitfaf7b7af6e51a33b88453821d792c89a84f72b1d (patch)
treebff70e6a71339e4d62e90c23ead1fc351effc89a /arch/arm/mach-ep93xx
parentcc1602604d1654991f3ce02b664178b3e672afe7 (diff)
downloadbarebox-faf7b7af6e51a33b88453821d792c89a84f72b1d.tar.gz
barebox-faf7b7af6e51a33b88453821d792c89a84f72b1d.tar.xz
ARM: give boards control of the reset entry point
On some SoCs (for example AM35xx), the ROM bootloader passes useful information in r0 when jumping to barebox. To avoid overwriting this in the generic reset code, we introduce common_reset as a C function and as an assembler macro. This is then called form the reset entry point (either in common or in board code). This patch is based on code by Sascha Hauer <s.hauer@pengutronix.de>. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/lowlevel_init.S15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-ep93xx/lowlevel_init.S b/arch/arm/mach-ep93xx/lowlevel_init.S
index 27c2c90b7d..07da8ae178 100644
--- a/arch/arm/mach-ep93xx/lowlevel_init.S
+++ b/arch/arm/mach-ep93xx/lowlevel_init.S
@@ -25,12 +25,11 @@
*/
#include <mach/ep93xx-regs.h>
+#include <asm/barebox-arm-head.h>
-.globl board_init_lowlevel
-board_init_lowlevel:
- /* backup return address */
- ldr r1, =SYSCON_SCRATCH0
- str lr, [r1]
+.globl reset
+reset:
+ common_reset r0
/* Turn on both LEDs */
bl red_LED_on
@@ -57,8 +56,4 @@ board_init_lowlevel:
orr r0, r0, #0xc0000000
mcr p15, 0, r0, c1, c0, 0
- /* restore return address */
- ldr r1, =SYSCON_SCRATCH0
- ldr lr, [r1]
-
- mov pc, lr
+ b board_init_lowlevel_return