Revision 71077c1c
b/hw/pci.c | ||
---|---|---|
923 | 923 |
} |
924 | 924 |
} |
925 | 925 |
|
926 |
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
|
|
926 |
PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name)
|
|
927 | 927 |
{ |
928 | 928 |
DeviceState *dev; |
929 | 929 |
|
930 | 930 |
dev = qdev_create(&bus->qbus, name); |
931 | 931 |
qdev_prop_set_uint32(dev, "addr", devfn); |
932 |
qdev_init(dev); |
|
932 |
return DO_UPCAST(PCIDevice, qdev, dev); |
|
933 |
} |
|
933 | 934 |
|
934 |
return (PCIDevice *)dev; |
|
935 |
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name) |
|
936 |
{ |
|
937 |
PCIDevice *dev = pci_create_noinit(bus, devfn, name); |
|
938 |
qdev_init(&dev->qdev); |
|
939 |
return dev; |
|
935 | 940 |
} |
936 | 941 |
|
937 | 942 |
static int pci_find_space(PCIDevice *pdev, uint8_t size) |
b/hw/pci.h | ||
---|---|---|
328 | 328 |
void pci_qdev_register_many(PCIDeviceInfo *info); |
329 | 329 |
|
330 | 330 |
PCIDevice *pci_create(const char *name, const char *devaddr); |
331 |
PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name); |
|
331 | 332 |
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name); |
332 | 333 |
|
333 | 334 |
/* lsi53c895a.c */ |
Also available in: Unified diff