hw/arm/aspeed: Rename SRAM memmap entry for multi-SRAM support
Some Aspeed SoCs contain multiple SRAM regions with different MMIO mappings, such as internal SRAM and secure SRAM. Prepare for future multi-SRAM support by renaming the SRAM memmap entry from ASPEED_DEV_SRAM to ASPEED_DEV_SRAM0. This makes the numbering explicit and aligns with the array-based SRAM representation introduced previously. No functional change. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-4-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Jamin Lin committed
May 25, 2026 at 05:30 UTC
598a9ecf2521821472cedab6750884e31480b9ba
7 files changed
+14
-14
hw/arm/aspeed_ast10x0.c
+2
-2
@@ -20,7 +20,7 @@
20
#define ASPEED_SOC_IOMEM_SIZE 0x00200000
21
22
static const hwaddr aspeed_soc_ast1030_memmap[] = {
23
- [ASPEED_DEV_SRAM] = 0x00000000,
23
+ [ASPEED_DEV_SRAM0] = 0x00000000,
24
[ASPEED_DEV_SECSRAM] = 0x79000000,
25
[ASPEED_DEV_IOMEM] = 0x7E600000,
26
[ASPEED_DEV_PWM] = 0x7E610000,
@@ -247,7 +247,7 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCState *a, Error **errp)
247
return false;
248
}
249
memory_region_add_subregion(s->memory,
250
- sc->memmap[ASPEED_DEV_SRAM],
250
+ sc->memmap[ASPEED_DEV_SRAM0],
251
&s->sram[0]);
252
memory_region_init_ram(&s->secsram, OBJECT(s), "sec.sram",
253
sc->secsram_size, &err);
hw/arm/aspeed_ast2400.c
+3
-3
@@ -38,7 +38,7 @@ static const hwaddr aspeed_soc_ast2400_memmap[] = {
38
[ASPEED_DEV_XDMA] = 0x1E6E7000,
39
[ASPEED_DEV_VIDEO] = 0x1E700000,
40
[ASPEED_DEV_ADC] = 0x1E6E9000,
41
- [ASPEED_DEV_SRAM] = 0x1E720000,
41
+ [ASPEED_DEV_SRAM0] = 0x1E720000,
42
[ASPEED_DEV_SDHCI] = 0x1E740000,
43
[ASPEED_DEV_GPIO] = 0x1E780000,
44
[ASPEED_DEV_RTC] = 0x1E781000,
@@ -75,7 +75,7 @@ static const hwaddr aspeed_soc_ast2500_memmap[] = {
75
[ASPEED_DEV_XDMA] = 0x1E6E7000,
76
[ASPEED_DEV_ADC] = 0x1E6E9000,
77
[ASPEED_DEV_VIDEO] = 0x1E700000,
78
- [ASPEED_DEV_SRAM] = 0x1E720000,
78
+ [ASPEED_DEV_SRAM0] = 0x1E720000,
79
[ASPEED_DEV_SDHCI] = 0x1E740000,
80
[ASPEED_DEV_GPIO] = 0x1E780000,
81
[ASPEED_DEV_RTC] = 0x1E781000,
@@ -286,7 +286,7 @@ static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
286
return;
287
}
288
memory_region_add_subregion(s->memory,
289
- sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]);
289
+ sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]);
290
291
/* SCU */
292
if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) {
hw/arm/aspeed_ast2600.c
+2
-2
@@ -23,7 +23,7 @@
23
24
static const hwaddr aspeed_soc_ast2600_memmap[] = {
25
[ASPEED_DEV_SPI_BOOT] = 0x00000000,
26
- [ASPEED_DEV_SRAM] = 0x10000000,
26
+ [ASPEED_DEV_SRAM0] = 0x10000000,
27
[ASPEED_DEV_DPMCU] = 0x18000000,
28
/* 0x16000000 0x17FFFFFF : AHB BUS do LPC Bus bridge */
29
[ASPEED_DEV_IOMEM] = 0x1E600000,
@@ -442,7 +442,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
442
return;
443
}
444
memory_region_add_subregion(s->memory,
445
- sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]);
445
+ sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]);
446
447
/* DPMCU */
448
aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->dpmcu),
hw/arm/aspeed_ast27x0-ssp.c
+2
-2
@@ -20,7 +20,7 @@
20
21
static const hwaddr aspeed_soc_ast27x0ssp_memmap[] = {
22
[ASPEED_DEV_SDRAM] = 0x00000000,
23
- [ASPEED_DEV_SRAM] = 0x70000000,
23
+ [ASPEED_DEV_SRAM0] = 0x70000000,
24
[ASPEED_DEV_INTC] = 0x72100000,
25
[ASPEED_DEV_SCU] = 0x72C02000,
26
[ASPEED_DEV_TIMER1] = 0x72C10000,
@@ -182,7 +182,7 @@ static void aspeed_soc_ast27x0ssp_realize(DeviceState *dev_soc, Error **errp)
182
/* SRAM */
183
memory_region_init_alias(&s->sram_alias, OBJECT(s), "sram.alias",
184
s->sram, 0, memory_region_size(s->sram));
185
- memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM],
185
+ memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM0],
186
&s->sram_alias);
187
188
/* SCU */
hw/arm/aspeed_ast27x0-tsp.c
+2
-2
@@ -20,7 +20,7 @@
20
21
static const hwaddr aspeed_soc_ast27x0tsp_memmap[] = {
22
[ASPEED_DEV_SDRAM] = 0x00000000,
23
- [ASPEED_DEV_SRAM] = 0x70000000,
23
+ [ASPEED_DEV_SRAM0] = 0x70000000,
24
[ASPEED_DEV_INTC] = 0x72100000,
25
[ASPEED_DEV_SCU] = 0x72C02000,
26
[ASPEED_DEV_TIMER1] = 0x72C10000,
@@ -182,7 +182,7 @@ static void aspeed_soc_ast27x0tsp_realize(DeviceState *dev_soc, Error **errp)
182
/* SRAM */
183
memory_region_init_alias(&s->sram_alias, OBJECT(s), "sram.alias",
184
s->sram, 0, memory_region_size(s->sram));
185
- memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM],
185
+ memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM0],
186
&s->sram_alias);
187
188
/* SCU */
hw/arm/aspeed_ast27x0.c
+2
-2
@@ -30,7 +30,7 @@
30
static const hwaddr aspeed_soc_ast2700_memmap[] = {
31
[ASPEED_DEV_VBOOTROM] = 0x00000000,
32
[ASPEED_DEV_IOMEM] = 0x00020000,
33
- [ASPEED_DEV_SRAM] = 0x10000000,
33
+ [ASPEED_DEV_SRAM0] = 0x10000000,
34
[ASPEED_DEV_DPMCU] = 0x11000000,
35
[ASPEED_DEV_IOMEM0] = 0x12000000,
36
[ASPEED_DEV_EHCI1] = 0x12061000,
@@ -783,7 +783,7 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp)
783
return;
784
}
785
memory_region_add_subregion(s->memory,
786
- sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]);
786
+ sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]);
787
788
/* VBOOTROM */
789
if (!memory_region_init_ram(&s->vbootrom, OBJECT(s), "aspeed.vbootrom",
include/hw/arm/aspeed_soc.h
+1
-1
@@ -228,7 +228,7 @@ enum {
228
ASPEED_DEV_SECSRAM,
229
ASPEED_DEV_EMMC_BC,
230
ASPEED_DEV_VIDEO,
231
- ASPEED_DEV_SRAM,
231
+ ASPEED_DEV_SRAM0,
232
ASPEED_DEV_SDHCI,
233
ASPEED_DEV_GPIO,
234
ASPEED_DEV_GPIO_1_8V,