aboutsummaryrefslogtreecommitdiff
path: root/hw/a9mpcore.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-01-24 13:12:29 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:50 -0600
commit999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch)
tree73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/a9mpcore.c
parent40021f08882aaef93c66c8c740087b6d3031b63a (diff)
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/a9mpcore.c')
-rw-r--r--hw/a9mpcore.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c
index 521b8cc784..b42c475077 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