aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host/pnv_phb.h
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2022-06-24 05:49:15 -0300
committerDaniel Henrique Barboza <danielhb413@gmail.com>2022-08-31 14:08:05 -0300
commit5ba76b61a2d3c90daa264bbaa14464eb3c49caa9 (patch)
treea034804999661b86ea8486ca8e0c1ede2c2a633d /hw/pci-host/pnv_phb.h
parent210aacb3b92707ecc5de811c743322ca395c0fa6 (diff)
downloadqemu-5ba76b61a2d3c90daa264bbaa14464eb3c49caa9.zip
qemu-5ba76b61a2d3c90daa264bbaa14464eb3c49caa9.tar.gz
qemu-5ba76b61a2d3c90daa264bbaa14464eb3c49caa9.tar.bz2
ppc/pnv: add pnv-phb-root-port device
We have two very similar root-port devices, pnv-phb3-root-port and pnv-phb4-root-port. Both consist of a wrapper around the PCIESlot device that, until now, has no additional attributes. The main difference between the PHB3 and PHB4 root ports is that pnv-phb4-root-port has the pnv_phb4_root_port_reset() callback. All other differences can be merged in a single device without too much trouble. This patch introduces the unified pnv-phb-root-port that, in time, will be used as the default root port for the pnv-phb device. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20220624084921.399219-7-danielhb413@gmail.com>
Diffstat (limited to 'hw/pci-host/pnv_phb.h')
-rw-r--r--hw/pci-host/pnv_phb.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/pci-host/pnv_phb.h b/hw/pci-host/pnv_phb.h
index a7cc861..58ebd6d 100644
--- a/hw/pci-host/pnv_phb.h
+++ b/hw/pci-host/pnv_phb.h
@@ -36,4 +36,20 @@ struct PnvPHB {
#define TYPE_PNV_PHB "pnv-phb"
OBJECT_DECLARE_SIMPLE_TYPE(PnvPHB, PNV_PHB)
+/*
+ * PHB PCIe Root port
+ */
+#define PNV_PHB3_DEVICE_ID 0x03dc
+#define PNV_PHB4_DEVICE_ID 0x04c1
+#define PNV_PHB5_DEVICE_ID 0x0652
+
+typedef struct PnvPHBRootPort {
+ PCIESlot parent_obj;
+
+ uint32_t version;
+} PnvPHBRootPort;
+
+#define TYPE_PNV_PHB_ROOT_PORT "pnv-phb-root-port"
+OBJECT_DECLARE_SIMPLE_TYPE(PnvPHBRootPort, PNV_PHB_ROOT_PORT)
+
#endif /* PCI_HOST_PNV_PHB_H */