From 40021f08882aaef93c66c8c740087b6d3031b63a Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sun, 4 Dec 2011 12:22:06 -0600 Subject: pci: convert to QEMU Object Model Signed-off-by: Anthony Liguori --- hw/ppce500_pci.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'hw/ppce500_pci.c') diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index b606206e00..bc783bf98a 100644 --- a/hw/ppce500_pci.c +++ b/hw/ppce500_pci.c @@ -339,13 +339,20 @@ static int e500_pcihost_initfn(SysBusDevice *dev) return 0; } -static PCIDeviceInfo e500_host_bridge_info = { - .qdev.name = "e500-host-bridge", - .qdev.desc = "Host bridge", - .qdev.size = sizeof(PCIDevice), - .vendor_id = PCI_VENDOR_ID_FREESCALE, - .device_id = PCI_DEVICE_ID_MPC8533E, - .class_id = PCI_CLASS_PROCESSOR_POWERPC, +static void e500_host_bridge_class_init(ObjectClass *klass, void *data) +{ + PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + + k->vendor_id = PCI_VENDOR_ID_FREESCALE; + k->device_id = PCI_DEVICE_ID_MPC8533E; + k->class_id = PCI_CLASS_PROCESSOR_POWERPC; +} + +static DeviceInfo e500_host_bridge_info = { + .name = "e500-host-bridge", + .desc = "Host bridge", + .size = sizeof(PCIDevice), + .class_init = e500_host_bridge_class_init, }; static SysBusDeviceInfo e500_pcihost_info = { -- cgit 1.4.1