aboutsummaryrefslogtreecommitdiff
path: root/hw/pl041.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/pl041.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/pl041.c')
-rw-r--r--hw/pl041.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/hw/pl041.c b/hw/pl041.c
index 4585ccf9c0..04828516c4 100644
--- a/hw/pl041.c
+++ b/hw/pl041.c
@@ -613,19 +613,27 @@ static const VMStateDescription vmstate_pl041 = {
}
};
-static SysBusDeviceInfo pl041_device_info = {
- .init = pl041_init,
- .qdev.name = "pl041",
- .qdev.size = sizeof(pl041_state),
- .qdev.vmsd = &vmstate_pl041,
- .qdev.reset = pl041_device_reset,
- .qdev.no_user = 1,
- .qdev.props = (Property[]) {
- /* Non-compact FIFO depth property */
- DEFINE_PROP_UINT32("nc_fifo_depth", pl041_state,
- fifo_depth, DEFAULT_FIFO_DEPTH),
- DEFINE_PROP_END_OF_LIST(),
- },
+static Property pl041_device_properties[] = {
+ /* Non-compact FIFO depth property */
+ DEFINE_PROP_UINT32("nc_fifo_depth", pl041_state, fifo_depth, DEFAULT_FIFO_DEPTH),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
+static void pl041_device_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = pl041_init;
+}
+
+static DeviceInfo pl041_device_info = {
+ .name = "pl041",
+ .size = sizeof(pl041_state),
+ .vmsd = &vmstate_pl041,
+ .reset = pl041_device_reset,
+ .no_user = 1,
+ .props = pl041_device_properties,
+ .class_init = pl041_device_class_init,
};
static void pl041_register_device(void)