summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-03-10 09:03:25 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-18 07:11:17 +0100
commit829bbd381f335297632220921b0b291d54e4a3d5 (patch)
tree3f8d81a2d88d6fd3797fcaccad3ff7a341f4b441 /arch
parentf5ac186c973856752fac2b7eee210afd94135f1c (diff)
downloadbarebox-829bbd381f335297632220921b0b291d54e4a3d5.tar.gz
ARM: at91: sama5d27-som1: branch to noinline function after stack setup
We need to branch out as soon as possible after setting up the stack. Do this and thereby avoid an access violation we now run into using OSELAS.Toolchain-2019.09.1. Fixes: 8bfb1852cf6a ("ARM: at91: add basic sama5d2-som1-ek1 support") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/sama5d27-som1/lowlevel.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/boards/sama5d27-som1/lowlevel.c b/arch/arm/boards/sama5d27-som1/lowlevel.c
index 6907dcf..62d35be 100644
--- a/arch/arm/boards/sama5d27-som1/lowlevel.c
+++ b/arch/arm/boards/sama5d27-som1/lowlevel.c
@@ -65,14 +65,10 @@ static void ek_dbgu_init(void)
extern char __dtb_z_at91_sama5d27_som1_ek_start[];
-ENTRY_FUNCTION(start_sama5d27_som1_ek, r0, r1, r2)
+static noinline void som1_entry(void)
{
void *fdt;
- arm_cpu_lowlevel_init();
-
- arm_setup_stack(SAMA5D2_SRAM_BASE + SAMA5D2_SRAM_SIZE);
-
if (IS_ENABLED(CONFIG_DEBUG_LL))
ek_dbgu_init();
@@ -81,3 +77,12 @@ ENTRY_FUNCTION(start_sama5d27_som1_ek, r0, r1, r2)
ek_turn_led(RGB_LED_GREEN);
barebox_arm_entry(SAMA5_DDRCS, SZ_128M, fdt);
}
+
+ENTRY_FUNCTION(start_sama5d27_som1_ek, r0, r1, r2)
+{
+ arm_cpu_lowlevel_init();
+
+ arm_setup_stack(SAMA5D2_SRAM_BASE + SAMA5D2_SRAM_SIZE);
+
+ som1_entry();
+}