aboutsummaryrefslogtreecommitdiff
path: root/core/pci.c
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2018-03-01 18:57:15 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-03-01 20:17:54 -0600
commit6b1cdedcef1d3aa0b4eb772228b5c5aad24764dc (patch)
tree5c3b4ab25352cd8b05fb763f867c34cf61ee0d8c /core/pci.c
parent9db58b1e5c031782c442f92775ee75326a7be1b3 (diff)
downloadskiboot-6b1cdedcef1d3aa0b4eb772228b5c5aad24764dc.zip
skiboot-6b1cdedcef1d3aa0b4eb772228b5c5aad24764dc.tar.gz
skiboot-6b1cdedcef1d3aa0b4eb772228b5c5aad24764dc.tar.bz2
npu2-opencapi: Train OpenCAPI links and setup devices
Scan the OpenCAPI links under the NPU, and for each link, reset the card, set up a device, train the link and register a PHB. Implement the necessary operations for the OpenCAPI PHB type. For bringup, test and debug purposes, we allow an NVRAM setting, "opencapi-link-training" that can be set to either disable link training completely or to use the prbs31 test pattern. To disable link training: nvram -p ibm,skiboot --update-config opencapi-link-training=none To use prbs31: nvram -p ibm,skiboot --update-config opencapi-link-training=prbs31 Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r--core/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pci.c b/core/pci.c
index e4b824a..982012f 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1549,7 +1549,8 @@ static void pci_add_one_device_node(struct phb *phb,
pd->dn = np = dt_new(parent_node, name);
/* XXX FIXME: make proper "compatible" properties */
- if (pci_has_cap(pd, PCI_CFG_CAP_ID_EXP, false)) {
+ if (pci_has_cap(pd, PCI_CFG_CAP_ID_EXP, false) ||
+ phb->phb_type == phb_type_npu_v2_opencapi) {
snprintf(compat, MAX_NAME, "pciex%x,%x",
vdid & 0xffff, vdid >> 16);
dt_add_property_cells(np, "ibm,pci-config-space-type", 1);