summaryrefslogtreecommitdiff
path: root/hw/i82378.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 12:22:06 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:50 -0600
commit40021f08882aaef93c66c8c740087b6d3031b63a (patch)
treea0429c040df66503d807770a3b89da9a0c70d8ac /hw/i82378.c
parent6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff)
downloadqemu-40021f08882aaef93c66c8c740087b6d3031b63a.tar.gz
qemu-40021f08882aaef93c66c8c740087b6d3031b63a.tar.bz2
qemu-40021f08882aaef93c66c8c740087b6d3031b63a.zip
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i82378.c')
-rw-r--r--hw/i82378.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/hw/i82378.c b/hw/i82378.c
index 95ae274f26..99b453abdc 100644
--- a/hw/i82378.c
+++ b/hw/i82378.c
@@ -238,18 +238,25 @@ static int pci_i82378_init(PCIDevice *dev)
return 0;
}
-static PCIDeviceInfo pci_i82378_info = {
- .init = pci_i82378_init,
- .qdev.name = "i82378",
- .qdev.size = sizeof(PCIi82378State),
- .qdev.vmsd = &vmstate_pci_i82378,
- .vendor_id = PCI_VENDOR_ID_INTEL,
- .device_id = PCI_DEVICE_ID_INTEL_82378,
- .revision = 0x03,
- .class_id = PCI_CLASS_BRIDGE_ISA,
- .subsystem_vendor_id = 0x0,
- .subsystem_id = 0x0,
- .qdev.props = (Property[]) {
+static void pci_i82378_class_init(ObjectClass *klass, void *data)
+{
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+ k->init = pci_i82378_init;
+ k->vendor_id = PCI_VENDOR_ID_INTEL;
+ k->device_id = PCI_DEVICE_ID_INTEL_82378;
+ k->revision = 0x03;
+ k->class_id = PCI_CLASS_BRIDGE_ISA;
+ k->subsystem_vendor_id = 0x0;
+ k->subsystem_id = 0x0;
+}
+
+static DeviceInfo pci_i82378_info = {
+ .name = "i82378",
+ .size = sizeof(PCIi82378State),
+ .vmsd = &vmstate_pci_i82378,
+ .class_init = pci_i82378_class_init,
+ .props = (Property[]) {
DEFINE_PROP_HEX32("iobase", PCIi82378State, isa_io_base, 0x80000000),
DEFINE_PROP_HEX32("membase", PCIi82378State, isa_mem_base, 0xc0000000),
DEFINE_PROP_END_OF_LIST()