pci-bridge-dev: QOM parent field cleanup
Rename it to avoid accidental use. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Don Koch <dkoch@verizon.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
f055e96bd4
commit
57524e14cf
@ -27,8 +27,15 @@
|
|||||||
#include "exec/memory.h"
|
#include "exec/memory.h"
|
||||||
#include "hw/pci/pci_bus.h"
|
#include "hw/pci/pci_bus.h"
|
||||||
|
|
||||||
|
#define TYPE_PCI_BRIDGE_DEV "pci-bridge"
|
||||||
|
#define PCI_BRIDGE_DEV(obj) \
|
||||||
|
OBJECT_CHECK(PCIBridgeDev, (obj), TYPE_PCI_BRIDGE_DEV)
|
||||||
|
|
||||||
struct PCIBridgeDev {
|
struct PCIBridgeDev {
|
||||||
PCIBridge bridge;
|
/*< private >*/
|
||||||
|
PCIBridge parent_obj;
|
||||||
|
/*< public >*/
|
||||||
|
|
||||||
MemoryRegion bar;
|
MemoryRegion bar;
|
||||||
uint8_t chassis_nr;
|
uint8_t chassis_nr;
|
||||||
#define PCI_BRIDGE_DEV_F_MSI_REQ 0
|
#define PCI_BRIDGE_DEV_F_MSI_REQ 0
|
||||||
@ -39,7 +46,7 @@ typedef struct PCIBridgeDev PCIBridgeDev;
|
|||||||
static int pci_bridge_dev_initfn(PCIDevice *dev)
|
static int pci_bridge_dev_initfn(PCIDevice *dev)
|
||||||
{
|
{
|
||||||
PCIBridge *br = PCI_BRIDGE(dev);
|
PCIBridge *br = PCI_BRIDGE(dev);
|
||||||
PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br);
|
PCIBridgeDev *bridge_dev = PCI_BRIDGE_DEV(dev);
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = pci_bridge_initfn(dev, TYPE_PCI_BUS);
|
err = pci_bridge_initfn(dev, TYPE_PCI_BUS);
|
||||||
@ -81,8 +88,7 @@ bridge_error:
|
|||||||
|
|
||||||
static void pci_bridge_dev_exitfn(PCIDevice *dev)
|
static void pci_bridge_dev_exitfn(PCIDevice *dev)
|
||||||
{
|
{
|
||||||
PCIBridge *br = PCI_BRIDGE(dev);
|
PCIBridgeDev *bridge_dev = PCI_BRIDGE_DEV(dev);
|
||||||
PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br);
|
|
||||||
if (msi_present(dev)) {
|
if (msi_present(dev)) {
|
||||||
msi_uninit(dev);
|
msi_uninit(dev);
|
||||||
}
|
}
|
||||||
@ -104,7 +110,7 @@ static void pci_bridge_dev_write_config(PCIDevice *d,
|
|||||||
|
|
||||||
static void qdev_pci_bridge_dev_reset(DeviceState *qdev)
|
static void qdev_pci_bridge_dev_reset(DeviceState *qdev)
|
||||||
{
|
{
|
||||||
PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
|
PCIDevice *dev = PCI_DEVICE(qdev);
|
||||||
|
|
||||||
pci_bridge_reset(qdev);
|
pci_bridge_reset(qdev);
|
||||||
shpc_reset(dev);
|
shpc_reset(dev);
|
||||||
@ -120,8 +126,8 @@ static Property pci_bridge_dev_properties[] = {
|
|||||||
static const VMStateDescription pci_bridge_dev_vmstate = {
|
static const VMStateDescription pci_bridge_dev_vmstate = {
|
||||||
.name = "pci_bridge",
|
.name = "pci_bridge",
|
||||||
.fields = (VMStateField[]) {
|
.fields = (VMStateField[]) {
|
||||||
VMSTATE_PCI_DEVICE(bridge.parent_obj, PCIBridgeDev),
|
VMSTATE_PCI_DEVICE(parent_obj, PCIBridge),
|
||||||
SHPC_VMSTATE(bridge.parent_obj.shpc, PCIBridgeDev),
|
SHPC_VMSTATE(shpc, PCIDevice),
|
||||||
VMSTATE_END_OF_LIST()
|
VMSTATE_END_OF_LIST()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -145,7 +151,7 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const TypeInfo pci_bridge_dev_info = {
|
static const TypeInfo pci_bridge_dev_info = {
|
||||||
.name = "pci-bridge",
|
.name = TYPE_PCI_BRIDGE_DEV,
|
||||||
.parent = TYPE_PCI_BRIDGE,
|
.parent = TYPE_PCI_BRIDGE,
|
||||||
.instance_size = sizeof(PCIBridgeDev),
|
.instance_size = sizeof(PCIBridgeDev),
|
||||||
.class_init = pci_bridge_dev_class_init,
|
.class_init = pci_bridge_dev_class_init,
|
||||||
|
Loading…
Reference in New Issue
Block a user