mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
aspeed/sdmc: Introduce an object class per SoC
Use class handlers and class constants to differentiate the characteristics of the memory controller and remove the 'silicon_rev' property. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Message-id: 20190925143248.10000-9-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
fadefada4d
commit
8e00d1a97d
3 changed files with 122 additions and 70 deletions
|
@ -205,10 +205,9 @@ static void aspeed_soc_init(Object *obj)
|
|||
sizeof(s->spi[i]), typename);
|
||||
}
|
||||
|
||||
snprintf(typename, sizeof(typename), "aspeed.sdmc-%s", socname);
|
||||
sysbus_init_child_obj(obj, "sdmc", OBJECT(&s->sdmc), sizeof(s->sdmc),
|
||||
TYPE_ASPEED_SDMC);
|
||||
qdev_prop_set_uint32(DEVICE(&s->sdmc), "silicon-rev",
|
||||
sc->info->silicon_rev);
|
||||
typename);
|
||||
object_property_add_alias(obj, "ram-size", OBJECT(&s->sdmc),
|
||||
"ram-size", &error_abort);
|
||||
object_property_add_alias(obj, "max-ram-size", OBJECT(&s->sdmc),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue