Skip to contentSkip to conversation

aspeed: Add eMMC Boot Controller stub

PATCH In review Joel Stanley 2 participants 2 messages Mar 18, 2022 Arm/Aspeed machine support

lore
Share & tools
lore

Joel Stanley

author maintainer
#0 lore raw

PATCH 1/1 aspeed: Add eMMC Boot Controller stub

Guest code (u-boot) pokes at this on boot. No functionality is required for guest code to work correctly, but it helps to document the region being read from.

---
 include/hw/arm/aspeed_soc.h | 1 +
 hw/arm/aspeed_ast2600.c     | 6 ++++++
 2 files changed, 7 insertions(+)
include/hw/arm/aspeed_soc.h +1 -0
index cf484eae0e60..b9cd51119608 100644
@@ -119,6 +119,7 @@ enum {
     ASPEED_DEV_SCU,
     ASPEED_DEV_ADC,
     ASPEED_DEV_SBC,
+    ASPEED_DEV_EMMC_BC,
     ASPEED_DEV_VIDEO,
     ASPEED_DEV_SRAM,
     ASPEED_DEV_SDHCI,
hw/arm/aspeed_ast2600.c +6 -0
index 25ae916e31ae..11cb6cf86bd2 100644
@@ -48,6 +48,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = {
     [ASPEED_DEV_ADC]       = 0x1E6E9000,
     [ASPEED_DEV_DP]        = 0x1E6EB000,
     [ASPEED_DEV_SBC]       = 0x1E6F2000,
+    [ASPEED_DEV_EMMC_BC]   = 0x1E6f5000,
     [ASPEED_DEV_VIDEO]     = 0x1E700000,
     [ASPEED_DEV_SDHCI]     = 0x1E740000,
     [ASPEED_DEV_EMMC]      = 0x1E750000,
@@ -267,6 +268,11 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
     create_unimplemented_device("aspeed.video", sc->memmap[ASPEED_DEV_VIDEO],
                                 0x1000);
 
+    /* eMMC Boot Controller stub */
+    create_unimplemented_device("aspeed.emmc-boot-controller",
+                                sc->memmap[ASPEED_DEV_EMMC_BC],
+                                0x1000);
+
     /* CPU */
     for (i = 0; i < sc->num_cpus; i++) {
         if (sc->num_cpus > 1) {
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 35 lines · Joel Stanley

Guest code (u-boot) pokes at this on boot. No functionality is required for guest code to work correctly, but it helps to document the region being read from.

---
  include/hw/arm/aspeed_soc.h | 1 +
  hw/arm/aspeed_ast2600.c     | 6 ++++++
  2 files changed, 7 insertions(+)
include/hw/arm/aspeed_soc.h +1 -0
index cf484eae0e60..b9cd51119608 100644
@@ -119,6 +119,7 @@ enum {
      ASPEED_DEV_SCU,
      ASPEED_DEV_ADC,
      ASPEED_DEV_SBC,
+    ASPEED_DEV_EMMC_BC,
      ASPEED_DEV_VIDEO,
      ASPEED_DEV_SRAM,
      ASPEED_DEV_SDHCI,
hw/arm/aspeed_ast2600.c +1 -0
index 25ae916e31ae..11cb6cf86bd2 100644
@@ -48,6 +48,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = {
      [ASPEED_DEV_ADC]       = 0x1E6E9000,
      [ASPEED_DEV_DP]        = 0x1E6EB000,
      [ASPEED_DEV_SBC]       = 0x1E6F2000,
+    [ASPEED_DEV_EMMC_BC]   = 0x1E6f5000,
      [ASPEED_DEV_VIDEO]     = 0x1E700000,
      [ASPEED_DEV_SDHCI]     = 0x1E740000,
      [ASPEED_DEV_EMMC]      = 0x1E750000,

hw/arm/aspeed_ast2600.c static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) · line 274

Quoted 7 lines
hw/arm/aspeed_ast2600.c +4 -0
@@ -267,6 +268,11 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
      create_unimplemented_device("aspeed.video", sc->memmap[ASPEED_DEV_VIDEO],
                                  0x1000);
 
+    /* eMMC Boot Controller stub */
+    create_unimplemented_device("aspeed.emmc-boot-controller",
+                                sc->memmap[ASPEED_DEV_EMMC_BC],
+                                0x1000);

We should add more of these for the controllers that QEMU doesn't model. The "aspeed_soc.io" region is really too large to be useful.

Thanks,

C.

Quoted 4 lines
hw/arm/aspeed_ast2600.c +1 -0
+
      /* CPU */
      for (i = 0; i < sc->num_cpus; i++) {
          if (sc->num_cpus > 1) {