From 999e12bbe85c5dcf49bef13bce4f97399c7105f4 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Tue, 24 Jan 2012 13:12:29 -0600 Subject: 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 --- hw/a9mpcore.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'hw/a9mpcore.c') diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c index 521b8cc78..b42c47507 100644 --- a/hw/a9mpcore.c +++ b/hw/a9mpcore.c @@ -208,13 +208,20 @@ static const VMStateDescription vmstate_a9mp_priv = { } }; -static SysBusDeviceInfo a9mp_priv_info = { - .init = a9mp_priv_init, - .qdev.name = "a9mpcore_priv", - .qdev.size = sizeof(a9mp_priv_state), - .qdev.vmsd = &vmstate_a9mp_priv, - .qdev.reset = a9mp_priv_reset, - .qdev.props = (Property[]) { +static void a9mp_priv_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); + + k->init = a9mp_priv_init; +} + +static DeviceInfo a9mp_priv_info = { + .name = "a9mpcore_priv", + .size = sizeof(a9mp_priv_state), + .vmsd = &vmstate_a9mp_priv, + .reset = a9mp_priv_reset, + .class_init = a9mp_priv_class_init, + .props = (Property[]) { DEFINE_PROP_UINT32("num-cpu", a9mp_priv_state, num_cpu, 1), /* The Cortex-A9MP may have anything from 0 to 224 external interrupt * IRQ lines (with another 32 internal). We default to 64+32, which -- cgit v1.2.3