diff options
author | Pali Rohár <pali@kernel.org> | 2021-07-23 11:14:25 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-07-31 09:49:32 +0200 |
commit | 9d0225b7fa1571ebe62f7c59ae140fd8df77a34d (patch) | |
tree | feac296963426cd00408972fe68c05b3c84c5ba0 /arch/arm/mach-mvebu/spl.c | |
parent | e1cd0d424cc5b30c731482e48a1c71f3c44755e5 (diff) | |
download | u-boot-9d0225b7fa1571ebe62f7c59ae140fd8df77a34d.zip u-boot-9d0225b7fa1571ebe62f7c59ae140fd8df77a34d.tar.gz u-boot-9d0225b7fa1571ebe62f7c59ae140fd8df77a34d.tar.bz2 |
arm: mvebu: Implement return_to_bootrom() via U-Boot's SPL framework
U-Boot's SPL framework already has an API for loading U-Boot via
BootROM.
Implement the function board_return_to_bootrom() for mvebu SPL code.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'arch/arm/mach-mvebu/spl.c')
-rw-r--r-- | arch/arm/mach-mvebu/spl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 16ebb7a..836eb18 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -79,6 +79,18 @@ u32 spl_boot_device(void) return get_boot_device(); } +int board_return_to_bootrom(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) +{ + u32 *regs = *(u32 **)CONFIG_SPL_BOOTROM_SAVE; + + printf("Returning to BootROM (return address 0x%08x)...\n", regs[13]); + return_to_bootrom(); + + /* NOTREACHED - return_to_bootrom() does not return */ + hang(); +} + void board_init_f(ulong dummy) { int ret; |