aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/armv7m.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/armv7m.c')
-rw-r--r--hw/arm/armv7m.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 9e00d4037c..6b07666057 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -134,14 +134,13 @@ static void armv7m_instance_init(Object *obj)
memory_region_init(&s->container, obj, "armv7m-container", UINT64_MAX);
- object_initialize(&s->nvic, sizeof(s->nvic), TYPE_NVIC);
- qdev_set_parent_bus(DEVICE(&s->nvic), sysbus_get_default());
+ sysbus_init_child_obj(obj, "nvnic", &s->nvic, sizeof(s->nvic), TYPE_NVIC);
object_property_add_alias(obj, "num-irq",
OBJECT(&s->nvic), "num-irq", &error_abort);
for (i = 0; i < ARRAY_SIZE(s->bitband); i++) {
- object_initialize(&s->bitband[i], sizeof(s->bitband[i]), TYPE_BITBAND);
- qdev_set_parent_bus(DEVICE(&s->bitband[i]), sysbus_get_default());
+ sysbus_init_child_obj(obj, "bitband[*]", &s->bitband[i],
+ sizeof(s->bitband[i]), TYPE_BITBAND);
}
}