diff options
author | Andreas Färber <afaerber@suse.de> | 2012-08-20 19:08:05 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-22 10:47:17 -0500 |
commit | 8c9f64df3dd76c253e4961c5d2f075bffcc29e1d (patch) | |
tree | eadc12864a91f1073c2706bde8043d46e1c42337 /hw/spapr_pci.h | |
parent | 03a6b667702b0af0e7b36754489aed6aa82d30a1 (diff) | |
download | qemu-8c9f64df3dd76c253e4961c5d2f075bffcc29e1d.zip qemu-8c9f64df3dd76c253e4961c5d2f075bffcc29e1d.tar.gz qemu-8c9f64df3dd76c253e4961c5d2f075bffcc29e1d.tar.bz2 |
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h index 7518899..4140ee6 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; |