aboutsummaryrefslogtreecommitdiff
path: root/hw/milkymist-minimac2.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/milkymist-minimac2.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/milkymist-minimac2.c')
-rw-r--r--hw/milkymist-minimac2.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/hw/milkymist-minimac2.c b/hw/milkymist-minimac2.c
index 107ba65e2e..1ac6c6a70a 100644
--- a/hw/milkymist-minimac2.c
+++ b/hw/milkymist-minimac2.c
@@ -516,19 +516,28 @@ static const VMStateDescription vmstate_milkymist_minimac2 = {
}
};
-static SysBusDeviceInfo milkymist_minimac2_info = {
- .init = milkymist_minimac2_init,
- .qdev.name = "milkymist-minimac2",
- .qdev.size = sizeof(MilkymistMinimac2State),
- .qdev.vmsd = &vmstate_milkymist_minimac2,
- .qdev.reset = milkymist_minimac2_reset,
- .qdev.props = (Property[]) {
- DEFINE_PROP_TADDR("buffers_base", MilkymistMinimac2State,
- buffers_base, 0),
- DEFINE_NIC_PROPERTIES(MilkymistMinimac2State, conf),
- DEFINE_PROP_STRING("phy_model", MilkymistMinimac2State, phy_model),
- DEFINE_PROP_END_OF_LIST(),
- }
+static Property milkymist_minimac2_properties[] = {
+ DEFINE_PROP_TADDR("buffers_base", MilkymistMinimac2State,
+ buffers_base, 0),
+ DEFINE_NIC_PROPERTIES(MilkymistMinimac2State, conf),
+ DEFINE_PROP_STRING("phy_model", MilkymistMinimac2State, phy_model),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
+static void milkymist_minimac2_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = milkymist_minimac2_init;
+}
+
+static DeviceInfo milkymist_minimac2_info = {
+ .name = "milkymist-minimac2",
+ .size = sizeof(MilkymistMinimac2State),
+ .vmsd = &vmstate_milkymist_minimac2,
+ .reset = milkymist_minimac2_reset,
+ .props = milkymist_minimac2_properties,
+ .class_init = milkymist_minimac2_class_init,
};
static void milkymist_minimac2_register(void)