PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,

                        pci_map_irq_fn map_irq, const char *name)

{

    PCIDevice *dev;

    PCIBridge *s;



    dev = pci_create(bus, devfn, "pci-bridge");

    qdev_prop_set_uint32(&dev->qdev, "vendorid", vid);

    qdev_prop_set_uint32(&dev->qdev, "deviceid", did);

    qdev_init(&dev->qdev);



    s = DO_UPCAST(PCIBridge, dev, dev);

    pci_register_secondary_bus(&s->bus, &s->dev, map_irq, name);

    return &s->bus;

}

PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,

                        pci_map_irq_fn map_irq, const char *name)

{

    PCIDevice *dev;

    PCIBridge *s;



    dev = pci_create(bus, devfn, "pci-bridge");

    qdev_prop_set_uint32(&dev->qdev, "vendorid", vid);

    qdev_prop_set_uint32(&dev->qdev, "deviceid", did);

    qdev_init(&dev->qdev);



    s = DO_UPCAST(PCIBridge, dev, dev);

    pci_register_secondary_bus(&s->bus, &s->dev, map_irq, name);

    return &s->bus;

}

    qdev_init(&dev->qdev);     qdev_init(&dev->qdev);     qdev_init(&dev->qdev);     qdev_init(&dev->qdev);     qdev_init(&dev->qdev);     qdev_init(&dev->qdev);     qdev_init(&dev->qdev);     qdev_init(&dev->qdev);
PCIBus *FUNC_0(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,

                        pci_map_irq_fn map_irq, const char *name)

{

    PCIDevice *dev;

    PCIBridge *s;



    dev = pci_create(bus, devfn, "pci-bridge");

    qdev_prop_set_uint32(&dev->qdev, "vendorid", vid);

    qdev_prop_set_uint32(&dev->qdev, "deviceid", did);

    qdev_init(&dev->qdev);



    s = DO_UPCAST(PCIBridge, dev, dev);

    pci_register_secondary_bus(&s->bus, &s->dev, map_irq, name);

    return &s->bus;

}

PCIBus *FUNC_0(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,
pci_map_irq_fn map_irq, const char *name)
{ PCIDevice *dev; PCIBridge *s; dev = pci_create(bus, devfn, "pci-bridge"); qdev_prop_set_uint32(&dev->qdev, "vendorid", vid); qdev_prop_set_uint32(&dev->qdev, "deviceid", did); qdev_init(&dev->qdev); s = DO_UPCAST(PCIBridge, dev, dev); pci_register_secondary_bus(&s->bus, &s->dev, map_irq, name); return &s->bus; }