mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
aspeed/smc: Drop AspeedSMCController structure
The characteristics of the Aspeed controllers are described in a AspeedSMCController structure which is redundant with the AspeedSMCClass. Move all attributes under the class and adapt the code to use class attributes instead. This is a large change but it is functionally equivalent. Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
d0180a3ae4
commit
30b6852ce4
4 changed files with 511 additions and 422 deletions
|
@ -310,7 +310,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
|
|||
}
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->fmc), 0, sc->memmap[ASPEED_DEV_FMC]);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->fmc), 1,
|
||||
s->fmc.ctrl->flash_window_base);
|
||||
ASPEED_SMC_GET_CLASS(&s->fmc)->flash_window_base);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->fmc), 0,
|
||||
aspeed_soc_get_irq(s, ASPEED_DEV_FMC));
|
||||
|
||||
|
@ -323,7 +323,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
|
|||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->spi[i]), 0,
|
||||
sc->memmap[ASPEED_DEV_SPI1 + i]);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->spi[i]), 1,
|
||||
s->spi[i].ctrl->flash_window_base);
|
||||
ASPEED_SMC_GET_CLASS(&s->spi[i])->flash_window_base);
|
||||
}
|
||||
|
||||
/* EHCI */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue