mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-21 23:21:58 +00:00
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>
This commit is contained in:
parent
e1cd0d424c
commit
9d0225b7fa
2 changed files with 16 additions and 0 deletions
|
@ -257,6 +257,7 @@ config MVEBU_SPL_BOOT_DEVICE_SPI
|
|||
select SPL_SPI_FLASH_SUPPORT
|
||||
select SPL_SPI_LOAD
|
||||
select SPL_SPI_SUPPORT
|
||||
select SPL_BOOTROM_SUPPORT
|
||||
|
||||
config MVEBU_SPL_BOOT_DEVICE_MMC
|
||||
bool "SDIO/MMC card"
|
||||
|
@ -267,14 +268,17 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
|
|||
select SPL_GPIO
|
||||
select SPL_LIBDISK_SUPPORT
|
||||
select SPL_MMC_SUPPORT
|
||||
select SPL_BOOTROM_SUPPORT
|
||||
|
||||
config MVEBU_SPL_BOOT_DEVICE_SATA
|
||||
bool "SATA"
|
||||
select SPL_SATA_SUPPORT
|
||||
select SPL_LIBDISK_SUPPORT
|
||||
select SPL_BOOTROM_SUPPORT
|
||||
|
||||
config MVEBU_SPL_BOOT_DEVICE_UART
|
||||
bool "UART"
|
||||
select SPL_BOOTROM_SUPPORT
|
||||
|
||||
endchoice
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue