From faf7b7af6e51a33b88453821d792c89a84f72b1d Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Mon, 24 Sep 2012 10:18:34 +0200 Subject: 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 . Signed-off-by: Jan Luebbe Signed-off-by: Sascha Hauer --- arch/arm/boards/eukrea_cpuimx35/lowlevel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm/boards/eukrea_cpuimx35') diff --git a/arch/arm/boards/eukrea_cpuimx35/lowlevel.c b/arch/arm/boards/eukrea_cpuimx35/lowlevel.c index 57867dc85b..b8dec71395 100644 --- a/arch/arm/boards/eukrea_cpuimx35/lowlevel.c +++ b/arch/arm/boards/eukrea_cpuimx35/lowlevel.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +60,7 @@ static void __bare_init __naked insdram(void) } #endif -void __bare_init __naked board_init_lowlevel(void) +void __bare_init __naked reset(void) { uint32_t r, s; unsigned long ccm_base = IMX_CCM_BASE; @@ -69,6 +70,8 @@ void __bare_init __naked board_init_lowlevel(void) #endif register uint32_t loops = 0x20000; + common_reset(); + r = get_cr(); r |= CR_Z; /* Flow prediction (Z) */ r |= CR_U; /* unaligned accesses */ -- cgit v1.2.3