summary refs log tree commit diff stats
path: root/include/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-12 19:56:00 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-29 20:45:24 +0200
commitbcb7575068581a7589234bdd55e8d9a9351611d9 (patch)
tree41625e4da12d73ba327e178375a004e7062f56ea /include/hw
parent5315dc78d089191e6a34a9f9f8913b7f365d504a (diff)
downloadfocaccia-qemu-bcb7575068581a7589234bdd55e8d9a9351611d9.tar.gz
focaccia-qemu-bcb7575068581a7589234bdd55e8d9a9351611d9.zip
pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types
Move PCIEPort's "port" property to the new type, same for "aer_log_max".
Move PCIESlot's "chassis" and "slot" properties to the new type.

Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/pci/pcie_port.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/hw/pci/pcie_port.h b/include/hw/pci/pcie_port.h
index d89aa615c5..e167bf7520 100644
--- a/include/hw/pci/pcie_port.h
+++ b/include/hw/pci/pcie_port.h
@@ -24,8 +24,13 @@
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pci_bus.h"
 
+#define TYPE_PCIE_PORT "pcie-port"
+#define PCIE_PORT(obj) OBJECT_CHECK(PCIEPort, (obj), TYPE_PCIE_PORT)
+
 struct PCIEPort {
-    PCIBridge   br;
+    /*< private >*/
+    PCIBridge   parent_obj;
+    /*< public >*/
 
     /* pci express switch port */
     uint8_t     port;
@@ -33,8 +38,13 @@ struct PCIEPort {
 
 void pcie_port_init_reg(PCIDevice *d);
 
+#define TYPE_PCIE_SLOT "pcie-slot"
+#define PCIE_SLOT(obj) OBJECT_CHECK(PCIESlot, (obj), TYPE_PCIE_SLOT)
+
 struct PCIESlot {
-    PCIEPort    port;
+    /*< private >*/
+    PCIEPort    parent_obj;
+    /*< public >*/
 
     /* pci express switch port with slot */
     uint8_t     chassis;