summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/at91sam9260ek
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/boards/at91sam9260ek
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/boards/at91sam9260ek')
-rw-r--r--arch/arm/boards/at91sam9260ek/lowlevel_init.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/boards/at91sam9260ek/lowlevel_init.S b/arch/arm/boards/at91sam9260ek/lowlevel_init.S
index 4961682322..7d51b7bfe7 100644
--- a/arch/arm/boards/at91sam9260ek/lowlevel_init.S
+++ b/arch/arm/boards/at91sam9260ek/lowlevel_init.S
@@ -21,6 +21,9 @@
* MA 02111-1307 USA
*/
-.globl board_init_lowlevel
-board_init_lowlevel:
- mov pc, lr
+#include <asm/barebox-arm-head.h>
+
+.globl reset
+reset:
+ common_reset r0
+ b board_init_lowlevel_return