aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/aspeed_ast2600.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/aspeed_ast2600.c')
-rw-r--r--hw/arm/aspeed_ast2600.c39
1 files changed, 17 insertions, 22 deletions
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index beb688f..10e9264 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -131,8 +131,7 @@ static void aspeed_soc_ast2600_init(Object *obj)
}
snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname);
- sysbus_init_child_obj(obj, "scu", OBJECT(&s->scu), sizeof(s->scu),
- typename);
+ sysbus_init_child_obj(obj, "scu", &s->scu, sizeof(s->scu), typename);
qdev_prop_set_uint32(DEVICE(&s->scu), "silicon-rev",
sc->silicon_rev);
object_property_add_alias(obj, "hw-strap1", OBJECT(&s->scu),
@@ -145,36 +144,33 @@ static void aspeed_soc_ast2600_init(Object *obj)
sysbus_init_child_obj(obj, "a7mpcore", &s->a7mpcore,
sizeof(s->a7mpcore), TYPE_A15MPCORE_PRIV);
- sysbus_init_child_obj(obj, "rtc", OBJECT(&s->rtc), sizeof(s->rtc),
+ sysbus_init_child_obj(obj, "rtc", &s->rtc, sizeof(s->rtc),
TYPE_ASPEED_RTC);
snprintf(typename, sizeof(typename), "aspeed.timer-%s", socname);
- sysbus_init_child_obj(obj, "timerctrl", OBJECT(&s->timerctrl),
+ sysbus_init_child_obj(obj, "timerctrl", &s->timerctrl,
sizeof(s->timerctrl), typename);
snprintf(typename, sizeof(typename), "aspeed.i2c-%s", socname);
- sysbus_init_child_obj(obj, "i2c", OBJECT(&s->i2c), sizeof(s->i2c),
- typename);
+ sysbus_init_child_obj(obj, "i2c", &s->i2c, sizeof(s->i2c), typename);
snprintf(typename, sizeof(typename), "aspeed.fmc-%s", socname);
- sysbus_init_child_obj(obj, "fmc", OBJECT(&s->fmc), sizeof(s->fmc),
- typename);
+ sysbus_init_child_obj(obj, "fmc", &s->fmc, sizeof(s->fmc), typename);
object_property_add_alias(obj, "num-cs", OBJECT(&s->fmc), "num-cs");
for (i = 0; i < sc->spis_num; i++) {
snprintf(typename, sizeof(typename), "aspeed.spi%d-%s", i + 1, socname);
- sysbus_init_child_obj(obj, "spi[*]", OBJECT(&s->spi[i]),
+ sysbus_init_child_obj(obj, "spi[*]", &s->spi[i],
sizeof(s->spi[i]), typename);
}
for (i = 0; i < sc->ehcis_num; i++) {
- sysbus_init_child_obj(obj, "ehci[*]", OBJECT(&s->ehci[i]),
+ sysbus_init_child_obj(obj, "ehci[*]", &s->ehci[i],
sizeof(s->ehci[i]), TYPE_PLATFORM_EHCI);
}
snprintf(typename, sizeof(typename), "aspeed.sdmc-%s", socname);
- sysbus_init_child_obj(obj, "sdmc", OBJECT(&s->sdmc), sizeof(s->sdmc),
- typename);
+ sysbus_init_child_obj(obj, "sdmc", &s->sdmc, sizeof(s->sdmc), typename);
object_property_add_alias(obj, "ram-size", OBJECT(&s->sdmc),
"ram-size");
object_property_add_alias(obj, "max-ram-size", OBJECT(&s->sdmc),
@@ -182,30 +178,29 @@ static void aspeed_soc_ast2600_init(Object *obj)
for (i = 0; i < sc->wdts_num; i++) {
snprintf(typename, sizeof(typename), "aspeed.wdt-%s", socname);
- sysbus_init_child_obj(obj, "wdt[*]", OBJECT(&s->wdt[i]),
+ sysbus_init_child_obj(obj, "wdt[*]", &s->wdt[i],
sizeof(s->wdt[i]), typename);
}
for (i = 0; i < sc->macs_num; i++) {
- sysbus_init_child_obj(obj, "ftgmac100[*]", OBJECT(&s->ftgmac100[i]),
+ sysbus_init_child_obj(obj, "ftgmac100[*]", &s->ftgmac100[i],
sizeof(s->ftgmac100[i]), TYPE_FTGMAC100);
sysbus_init_child_obj(obj, "mii[*]", &s->mii[i], sizeof(s->mii[i]),
TYPE_ASPEED_MII);
}
- sysbus_init_child_obj(obj, "xdma", OBJECT(&s->xdma), sizeof(s->xdma),
+ sysbus_init_child_obj(obj, "xdma", &s->xdma, sizeof(s->xdma),
TYPE_ASPEED_XDMA);
snprintf(typename, sizeof(typename), "aspeed.gpio-%s", socname);
- sysbus_init_child_obj(obj, "gpio", OBJECT(&s->gpio), sizeof(s->gpio),
- typename);
+ sysbus_init_child_obj(obj, "gpio", &s->gpio, sizeof(s->gpio), typename);
snprintf(typename, sizeof(typename), "aspeed.gpio-%s-1_8v", socname);
- sysbus_init_child_obj(obj, "gpio_1_8v", OBJECT(&s->gpio_1_8v),
+ sysbus_init_child_obj(obj, "gpio_1_8v", &s->gpio_1_8v,
sizeof(s->gpio_1_8v), typename);
- sysbus_init_child_obj(obj, "sd-controller", OBJECT(&s->sdhci),
+ sysbus_init_child_obj(obj, "sd-controller", &s->sdhci,
sizeof(s->sdhci), TYPE_ASPEED_SDHCI);
object_property_set_int(OBJECT(&s->sdhci), 2, "num-slots", &error_abort);
@@ -213,17 +208,17 @@ static void aspeed_soc_ast2600_init(Object *obj)
/* Init sd card slot class here so that they're under the correct parent */
for (i = 0; i < ASPEED_SDHCI_NUM_SLOTS; ++i) {
sysbus_init_child_obj(obj, "sd-controller.sdhci[*]",
- OBJECT(&s->sdhci.slots[i]),
+ &s->sdhci.slots[i],
sizeof(s->sdhci.slots[i]), TYPE_SYSBUS_SDHCI);
}
- sysbus_init_child_obj(obj, "emmc-controller", OBJECT(&s->emmc),
+ sysbus_init_child_obj(obj, "emmc-controller", &s->emmc,
sizeof(s->emmc), TYPE_ASPEED_SDHCI);
object_property_set_int(OBJECT(&s->emmc), 1, "num-slots", &error_abort);
sysbus_init_child_obj(obj, "emmc-controller.sdhci",
- OBJECT(&s->emmc.slots[0]), sizeof(s->emmc.slots[0]),
+ &s->emmc.slots[0], sizeof(s->emmc.slots[0]),
TYPE_SYSBUS_SDHCI);
}