summaryrefslogtreecommitdiffstats
path: root/hw/arm/aspeed_soc.c
diff options
context:
space:
mode:
authorCédric Le Goater2019-09-25 16:32:29 +0200
committerPeter Maydell2019-10-15 19:09:04 +0200
commit72d96f8e2288e4bc7b31011c0c3f00448e2cef19 (patch)
treeca37991a74118ed310f6e7c9eb9747ce03f18480 /hw/arm/aspeed_soc.c
parenthw: aspeed_scu: Add AST2600 support (diff)
downloadqemu-72d96f8e2288e4bc7b31011c0c3f00448e2cef19.tar.gz
qemu-72d96f8e2288e4bc7b31011c0c3f00448e2cef19.tar.xz
qemu-72d96f8e2288e4bc7b31011c0c3f00448e2cef19.zip
aspeed/timer: Introduce an object class per SoC
The most important changes will be on the register range 0x34 - 0x3C memops. Introduce class read/write operations to handle the differences between SoCs. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Message-id: 20190925143248.10000-5-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/aspeed_soc.c')
-rw-r--r--hw/arm/aspeed_soc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
index c3821a5627..26e03486f9 100644
--- a/hw/arm/aspeed_soc.c
+++ b/hw/arm/aspeed_soc.c
@@ -182,8 +182,9 @@ static void aspeed_soc_init(Object *obj)
sysbus_init_child_obj(obj, "rtc", OBJECT(&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),
- sizeof(s->timerctrl), TYPE_ASPEED_TIMER);
+ sizeof(s->timerctrl), typename);
object_property_add_const_link(OBJECT(&s->timerctrl), "scu",
OBJECT(&s->scu), &error_abort);