summaryrefslogtreecommitdiffstats
path: root/hw/highbank.c
diff options
context:
space:
mode:
authorAnthony Liguori2012-01-24 20:12:29 +0100
committerAnthony Liguori2012-01-27 17:50:50 +0100
commit999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch)
tree73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/highbank.c
parentpci: convert to QEMU Object Model (diff)
downloadqemu-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/highbank.c')
-rw-r--r--hw/highbank.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/highbank.c b/hw/highbank.c
index 136297ca7d..9f767160db 100644
--- a/hw/highbank.c
+++ b/hw/highbank.c
@@ -159,18 +159,25 @@ static int highbank_regs_init(SysBusDevice *dev)
return 0;
}
-static SysBusDeviceInfo highbank_regs_info = {
- .init = highbank_regs_init,
- .qdev.name = "highbank-regs",
- .qdev.desc = "Calxeda Highbank registers",
- .qdev.size = sizeof(HighbankRegsState),
- .qdev.vmsd = &vmstate_highbank_regs,
- .qdev.reset = highbank_regs_reset,
+static void highbank_regs_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
+
+ sbc->init = highbank_regs_init;
+}
+
+static DeviceInfo highbank_regs_info = {
+ .name = "highbank-regs",
+ .desc = "Calxeda Highbank registers",
+ .size = sizeof(HighbankRegsState),
+ .vmsd = &vmstate_highbank_regs,
+ .class_init = highbank_regs_class_init,
+ .reset = highbank_regs_reset,
};
static void highbank_regs_register_device(void)
{
- sysbus_register_withprop(&highbank_regs_info);
+ sysbus_qdev_register(&highbank_regs_info);
}
device_init(highbank_regs_register_device)