summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/xload-mmc.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-07-21 08:14:33 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-08-03 23:32:54 +0200
commit1a54512bfcf290f7a2269359838f92aea438f71f (patch)
treefa84e86ade5167b8efa4430cfeddc61b4de51674 /arch/arm/mach-at91/xload-mmc.c
parentf9e7a605a8e1e6db11f62f2a9335c3775b44b220 (diff)
downloadbarebox-1a54512bfcf290f7a2269359838f92aea438f71f.tar.gz
barebox-1a54512bfcf290f7a2269359838f92aea438f71f.tar.xz
ARM: at91: pass along bootsource to netbooted barebox
ROM-Code passes boot source information in r4. First stage does likewise when invoking second stage. When net booting second stage, r4 has no definite value. Fix this and pass the original boot source along. This gives us a valid $bootsource value in net booted barebox, which is important, so the same environment is loaded. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91/xload-mmc.c')
-rw-r--r--arch/arm/mach-at91/xload-mmc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/xload-mmc.c b/arch/arm/mach-at91/xload-mmc.c
index 42341fa54b..e9edeccb7f 100644
--- a/arch/arm/mach-at91/xload-mmc.c
+++ b/arch/arm/mach-at91/xload-mmc.c
@@ -8,12 +8,6 @@
#include <asm/cache.h>
#include <pbl.h>
-static void __naked __noreturn xload_bb(void __noreturn (*bb)(void), u32 r4)
-{
- asm volatile("mov r4, %0" : : "r"(r4) : );
- asm volatile("bx %0" : : "r"(bb) : );
-}
-
static void at91_fat_start_image(struct pbl_bio *bio,
void *buf, unsigned int len,
u32 r4)
@@ -31,7 +25,7 @@ static void at91_fat_start_image(struct pbl_bio *bio,
sync_caches_for_execution();
- xload_bb(bb, r4);
+ sama5_boot_xload(bb, r4);
}
static const struct sdhci_instance {