summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/sama5d27-giantboard
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-07-01 11:11:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-07-14 20:32:56 +0200
commit5991cb8eeb8a4eea2587be3b1d1b45d845bd3c68 (patch)
treefeed9136ff5978a2c7ea1b62cb089325cd40b7c2 /arch/arm/boards/sama5d27-giantboard
parent7208a44d8bc6058a120d49b7061e2b9f9c0502c8 (diff)
downloadbarebox-5991cb8eeb8a4eea2587be3b1d1b45d845bd3c68.tar.gz
barebox-5991cb8eeb8a4eea2587be3b1d1b45d845bd3c68.tar.xz
ARM: at91: sama5d2: populate $bootsource and $bootsource_instance
The BootROM passes us information about the boot medium in r4 and we already use that in first stage and pass it along to second stage PBL already. To make use of it, we need to pass it to barebox proper, do this by writing it in the last 4 bytes of the SRAM. As second stage always run in DRAM, this is safe to do. We could also write to SRAM directly from first stage, but at91bootstrap passes info in r4 as well for the sama5d3 boards, so we do it likewise to maintain compatibility. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/sama5d27-giantboard')
-rw-r--r--arch/arm/boards/sama5d27-giantboard/lowlevel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/boards/sama5d27-giantboard/lowlevel.c b/arch/arm/boards/sama5d27-giantboard/lowlevel.c
index 0bb3a7289c..3dada9baf2 100644
--- a/arch/arm/boards/sama5d27-giantboard/lowlevel.c
+++ b/arch/arm/boards/sama5d27-giantboard/lowlevel.c
@@ -7,7 +7,7 @@
#include <init.h>
#include <asm/barebox-arm-head.h>
-#include <asm/barebox-arm.h>
+#include <mach/barebox-arm.h>
#include <mach/sama5d2_ll.h>
#include <mach/iomux.h>
#include <debug_ll.h>
@@ -25,7 +25,7 @@ static void dbgu_init(void)
extern char __dtb_z_at91_sama5d27_giantboard_start[];
-ENTRY_FUNCTION(start_sama5d27_giantboard, r0, r1, r2)
+SAMA5_ENTRY_FUNCTION(start_sama5d27_giantboard, r4)
{
void *fdt;
@@ -36,5 +36,5 @@ ENTRY_FUNCTION(start_sama5d27_giantboard, r0, r1, r2)
fdt = __dtb_z_at91_sama5d27_giantboard_start + get_runtime_offset();
- sama5d2_barebox_entry(fdt);
+ sama5d2_barebox_entry(r4, fdt);
}