diff options
author | Anthony Liguori | 2012-01-24 20:12:29 +0100 |
---|---|---|
committer | Anthony Liguori | 2012-01-27 17:50:50 +0100 |
commit | 999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch) | |
tree | 73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/arm_sysctl.c | |
parent | pci: convert to QEMU Object Model (diff) | |
download | qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.gz qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.xz qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.zip |
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.
Converting subclasses independently of their base class is prohibitively hard.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/arm_sysctl.c')
-rw-r--r-- | hw/arm_sysctl.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index 4b88648780..08fb4437cb 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -401,17 +401,26 @@ void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id) sysbus_mmio_map(sysbus_from_qdev(dev), 0, base); } -static SysBusDeviceInfo arm_sysctl_info = { - .init = arm_sysctl_init1, - .qdev.name = "realview_sysctl", - .qdev.size = sizeof(arm_sysctl_state), - .qdev.vmsd = &vmstate_arm_sysctl, - .qdev.reset = arm_sysctl_reset, - .qdev.props = (Property[]) { - DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0), - DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0), - DEFINE_PROP_END_OF_LIST(), - } +static Property arm_sysctl_properties[] = { + DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0), + DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0), + DEFINE_PROP_END_OF_LIST(), +}; + +static void arm_sysctl_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); + + k->init = arm_sysctl_init1; +} + +static DeviceInfo arm_sysctl_info = { + .name = "realview_sysctl", + .size = sizeof(arm_sysctl_state), + .vmsd = &vmstate_arm_sysctl, + .reset = arm_sysctl_reset, + .props = arm_sysctl_properties, + .class_init = arm_sysctl_class_init, }; static void arm_sysctl_register_devices(void) |