aboutsummaryrefslogtreecommitdiff
path: root/include/hw/pci/pcie_port.h
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/pci/pcie_port.h
parent5315dc78d089191e6a34a9f9f8913b7f365d504a (diff)
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/pci/pcie_port.h')
-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;