aboutsummaryrefslogtreecommitdiff
path: root/hw/spapr_pci.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-08-20 19:08:05 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-08-22 10:47:17 -0500
commit8c9f64df3dd76c253e4961c5d2f075bffcc29e1d (patch)
treeeadc12864a91f1073c2706bde8043d46e1c42337 /hw/spapr_pci.h
parent03a6b667702b0af0e7b36754489aed6aa82d30a1 (diff)
spapr_pci: QOM'ify sPAPR PCI host bridge
Introduce type constant. Introduce cast macro to drop bogus busdev field that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Free the identifier phb as acronym for PCI_HOST_BRIDGE. Updated against conflicting merge from branch 'agraf/ppc-for-upstream' (0d16fdd732d1b211842fa96b7c90ddf9e6bde0e4), which removed busdev field differently, moved some code around and added new occurrences of 'phb'. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/spapr_pci.h')
-rw-r--r--hw/spapr_pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h
index 7518899b85..4140ee67af 100644
--- a/hw/spapr_pci.h
+++ b/hw/spapr_pci.h
@@ -29,6 +29,11 @@
#define SPAPR_MSIX_MAX_DEVS 32
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+#define SPAPR_PCI_HOST_BRIDGE(obj) \
+ OBJECT_CHECK(sPAPRPHBState, (obj), TYPE_SPAPR_PCI_HOST_BRIDGE)
+
typedef struct sPAPRPHBState {
PCIHostState host_state;