[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 30/32] hw/arm/aspeed: Set boot device to emmc
From: |
Cédric Le Goater |
Subject: |
[PATCH 30/32] hw/arm/aspeed: Set boot device to emmc |
Date: |
Mon, 3 Jul 2023 15:25:07 +0200 |
From: Joel Stanley <joel@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 <joel@jms.id.au>
[ clg: activated support on rainier ]
Signed-off-by: Cédric Le Goater <clg@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
- [PATCH 18/32] hw/sd: Add emmc_cmd_APP_CMD() handler, (continued)
- [PATCH 18/32] hw/sd: Add emmc_cmd_APP_CMD() handler, Cédric Le Goater, 2023/07/03
- [PATCH 21/32] hw/sd: Add mmc switch function support, Cédric Le Goater, 2023/07/03
- [PATCH 22/32] hw/sd: Add emmc_cmd_SEND_EXT_CSD() handler, Cédric Le Goater, 2023/07/03
- [PATCH 19/32] hw/sd: add emmc_cmd_SEND_TUNING_BLOCK() handler, Cédric Le Goater, 2023/07/03
- [PATCH 20/32] hw/sd: Add CMD21 tuning sequence, Cédric Le Goater, 2023/07/03
- [PATCH 23/32] hw/sd: Support boot area in emmc image, Cédric Le Goater, 2023/07/03
- [PATCH 24/32] hw/sd: Subtract bootarea size from blk, Cédric Le Goater, 2023/07/03
- [PATCH 25/32] hw/sd: Add boot config support, Cédric Le Goater, 2023/07/03
- [PATCH 26/32] hw/sd: Fix SET_BLOCK_COUNT command argument, Cédric Le Goater, 2023/07/03
- [PATCH 28/32] hw/arm/aspeed: Add eMMC device, Cédric Le Goater, 2023/07/03
- [PATCH 30/32] hw/arm/aspeed: Set boot device to emmc,
Cédric Le Goater <=
- [PATCH 31/32] aspeed: Set bootconfig, Cédric Le Goater, 2023/07/03
- [PATCH 27/32] hw/sd: Update CMD1 definition for MMC, Cédric Le Goater, 2023/07/03
- [PATCH 32/32] aspeed: Introduce a 'boot-emmc' property for AST2600 based machines, Cédric Le Goater, 2023/07/03
- [PATCH 29/32] hw/arm/aspeed: Load eMMC first boot area as a boot rom, Cédric Le Goater, 2023/07/03