From: Joel Stanley <j...@jms.id.au> This must be configurable by the user, as it forces a the u-boot SPL to use the eMMC device to boot.
Signed-off-by: Joel Stanley <j...@jms.id.au> [ clg: activated support on rainier ] Signed-off-by: Cédric Le Goater <c...@kaod.org> --- include/hw/misc/aspeed_scu.h | 7 +++++++ hw/arm/aspeed.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/hw/misc/aspeed_scu.h b/include/hw/misc/aspeed_scu.h index 5c7c04eedfa7..d48ecf48b8fa 100644 --- a/include/hw/misc/aspeed_scu.h +++ b/include/hw/misc/aspeed_scu.h @@ -361,4 +361,11 @@ uint32_t aspeed_scu_get_apb_freq(AspeedSCUState *s); */ #define SCU_AST1030_CLK_GET_PCLK_DIV(x) (((x) >> 8) & 0xf) +/* STRAP1 SCU500 */ +#define AST26500_HW_STRAP_BOOT_SRC_EMMC (0x1 << 2) +#define AST26500_HW_STRAP_BOOT_SRC_SPI (0x0 << 2) + +/* STRAP2 SCU510 */ +#define AST26500_HW_STRAP_BOOT_SRC_UART (0x1 << 8) + #endif /* ASPEED_SCU_H */ diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 2cb51ffd8d49..00fd3c2e4e8a 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -179,11 +179,11 @@ struct AspeedMachineState { #define AST2600_EVB_HW_STRAP2 0x00000003 /* Tacoma hardware value */ -#define TACOMA_BMC_HW_STRAP1 0x00000000 +#define TACOMA_BMC_HW_STRAP1 (0x00000000 | AST26500_HW_STRAP_BOOT_SRC_EMMC) #define TACOMA_BMC_HW_STRAP2 0x00000040 /* Rainier hardware value: (QEMU prototype) */ -#define RAINIER_BMC_HW_STRAP1 0x00422016 +#define RAINIER_BMC_HW_STRAP1 (0x00422016 | AST26500_HW_STRAP_BOOT_SRC_EMMC) #define RAINIER_BMC_HW_STRAP2 0x80000848 /* Fuji hardware value */ -- 2.41.0