mirror of https://github.com/xqemu/xqemu.git
pc: add I440FX QOM cast macro
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1375109277-25561-3-git-send-email-imammedo@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f5338ee30d
commit
1d0d4aa412
|
@ -38,6 +38,10 @@
|
||||||
* http://download.intel.com/design/chipsets/datashts/29054901.pdf
|
* http://download.intel.com/design/chipsets/datashts/29054901.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost"
|
||||||
|
#define I440FX_PCI_HOST_BRIDGE(obj) \
|
||||||
|
OBJECT_CHECK(I440FXState, (obj), TYPE_I440FX_PCI_HOST_BRIDGE)
|
||||||
|
|
||||||
typedef struct I440FXState {
|
typedef struct I440FXState {
|
||||||
PCIHostState parent_obj;
|
PCIHostState parent_obj;
|
||||||
} I440FXState;
|
} I440FXState;
|
||||||
|
@ -257,7 +261,7 @@ static PCIBus *i440fx_common_init(const char *device_name,
|
||||||
PCII440FXState *f;
|
PCII440FXState *f;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
dev = qdev_create(NULL, "i440FX-pcihost");
|
dev = qdev_create(NULL, TYPE_I440FX_PCI_HOST_BRIDGE);
|
||||||
s = PCI_HOST_BRIDGE(dev);
|
s = PCI_HOST_BRIDGE(dev);
|
||||||
b = pci_bus_new(dev, NULL, pci_address_space,
|
b = pci_bus_new(dev, NULL, pci_address_space,
|
||||||
address_space_io, 0, TYPE_PCI_BUS);
|
address_space_io, 0, TYPE_PCI_BUS);
|
||||||
|
@ -661,7 +665,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TypeInfo i440fx_pcihost_info = {
|
static const TypeInfo i440fx_pcihost_info = {
|
||||||
.name = "i440FX-pcihost",
|
.name = TYPE_I440FX_PCI_HOST_BRIDGE,
|
||||||
.parent = TYPE_PCI_HOST_BRIDGE,
|
.parent = TYPE_PCI_HOST_BRIDGE,
|
||||||
.instance_size = sizeof(I440FXState),
|
.instance_size = sizeof(I440FXState),
|
||||||
.instance_init = i440fx_pcihost_initfn,
|
.instance_init = i440fx_pcihost_initfn,
|
||||||
|
|
Loading…
Reference in New Issue