[PATCH u-boot v2019.04-aspeed-openbmc 04/11] ast2600: spl: Support common boot devices
Joel Stanley
joel at jms.id.au
Tue Apr 13 18:07:48 AEST 2021
Aspeed's SDK has some custom boot devices. There's also the common SPL
code for loading boot images from various devices that the system can be
configured to use.
This will use the Aspeed device types first and then fall back to the
generic ones.
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
arch/arm/mach-aspeed/ast2600/spl.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/spl.c b/arch/arm/mach-aspeed/ast2600/spl.c
index d794421b4070..527e14f8e3b6 100644
--- a/arch/arm/mach-aspeed/ast2600/spl.c
+++ b/arch/arm/mach-aspeed/ast2600/spl.c
@@ -34,6 +34,7 @@ void board_init_f(ulong dummy)
u32 spl_boot_device(void)
{
+#if IS_ENABLED(CONFIG_ASPEED_SECURE_BOOT)
switch (aspeed_bootmode()) {
case AST_BOOTMODE_EMMC:
return (IS_ENABLED(CONFIG_ASPEED_SECURE_BOOT))?
@@ -47,6 +48,15 @@ u32 spl_boot_device(void)
default:
break;
}
+#endif
+ switch (aspeed_bootmode()) {
+ case AST_BOOTMODE_EMMC:
+ return BOOT_DEVICE_MMC1;
+ case AST_BOOTMODE_SPI:
+ return BOOT_DEVICE_SPI;
+ case AST_BOOTMODE_UART:
+ return BOOT_DEVICE_UART;
+ }
return BOOT_DEVICE_NONE;
}
--
2.30.2
More information about the openbmc
mailing list