Obviously, this isn't an acceptable approach. We need to convert these devices to qdev. --- hw/macio.c | 5 +++++ hw/openpic.c | 5 +++++ hw/ppc4xx_pci.c | 5 +++++ hw/prep_pci.c | 5 +++++ 4 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/hw/macio.c b/hw/macio.c index cc6ae40..936fd72 100644 --- a/hw/macio.c +++ b/hw/macio.c @@ -84,9 +84,14 @@ void macio_init (PCIBus *bus, int device_id, int is_oldworld, macio_state_t *macio_state; int i; +#if 0 d = pci_register_device(bus, "macio", sizeof(PCIDevice) + sizeof(macio_state_t), -1, NULL, NULL); +#else + abort(); + d = NULL; +#endif macio_state = (macio_state_t *)(d + 1); macio_state->is_oldworld = is_oldworld; macio_state->pic_mem = pic_mem; diff --git a/hw/openpic.c b/hw/openpic.c index 22fc275..b9faeaa 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -1192,8 +1192,13 @@ qemu_irq *openpic_init (PCIBus *bus, MemoryRegion **pmem, int nb_cpus, if (nb_cpus != 1) return NULL; if (bus) { +#if 0 opp = (openpic_t *)pci_register_device(bus, "OpenPIC", sizeof(openpic_t), -1, NULL, NULL); +#else + abort(); + opp = NULL; +#endif pci_conf = opp->pci_dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_IBM); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_IBM_OPENPIC2); diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c index 2c69210..55d87d5 100644 --- a/hw/ppc4xx_pci.c +++ b/hw/ppc4xx_pci.c @@ -342,9 +342,14 @@ PCIBus *ppc4xx_pci_init(CPUState *env, qemu_irq pci_irqs[4], get_system_io(), 0, 4); +#if 0 controller->pci_dev = pci_register_device(controller->pci_state.bus, "host bridge", sizeof(PCIDevice), 0, NULL, NULL); +#else + abort(); + controller->pci_dev = NULL; +#endif pci_conf = controller->pci_dev->config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_IBM); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_IBM_440GX); diff --git a/hw/prep_pci.c b/hw/prep_pci.c index ea9fb69..f990a2a 100644 --- a/hw/prep_pci.c +++ b/hw/prep_pci.c @@ -134,8 +134,13 @@ PCIBus *pci_prep_init(qemu_irq *pic, memory_region_add_subregion(address_space_mem, 0x80800000, &s->mmcfg); /* PCI host bridge */ +#if 0 d = pci_register_device(s->bus, "PREP Host Bridge - Motorola Raven", sizeof(PCIDevice), 0, NULL, NULL); +#else + abort(); + d = NULL; +#endif pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_MOTOROLA); pci_config_set_device_id(d->config, PCI_DEVICE_ID_MOTOROLA_RAVEN); d->config[0x08] = 0x00; // revision -- 1.7.4.1