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>
1 parent 7208a44 commit 5991cb8eeb8a4eea2587be3b1d1b45d845bd3c68
@Ahmad Fatoum Ahmad Fatoum authored on 1 Jul 2020
Sascha Hauer committed on 14 Jul 2020
Showing 6 changed files
View
arch/arm/boards/sama5d27-giantboard/lowlevel.c
View
arch/arm/boards/sama5d27-som1/lowlevel.c
View
arch/arm/mach-at91/ddramc.c
View
arch/arm/mach-at91/include/mach/ddramc.h
View
arch/arm/mach-at91/include/mach/sama5_bootsource.h
View
arch/arm/mach-at91/sama5d2.c