diff options
author | Christophe Lombard <clombard@linux.vnet.ibm.com> | 2021-10-14 17:56:54 +0200 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-10-19 12:26:01 +0530 |
commit | 882e867012a8c4af8a7bbd42b93816b2a2f3b827 (patch) | |
tree | ce5e90dbd3c61bcacc0b2f9476c14638d625b27f /core/pci-opal.c | |
parent | 8baea29fdeaa5eab26c1ca6e3b88e18a3387be96 (diff) | |
download | skiboot-882e867012a8c4af8a7bbd42b93816b2a2f3b827.zip skiboot-882e867012a8c4af8a7bbd42b93816b2a2f3b827.tar.gz skiboot-882e867012a8c4af8a7bbd42b93816b2a2f3b827.tar.bz2 |
pau: create phb
Implement the necessary operations for the OpenCAPI PHB type and
inform the device-tree properties associated.
The OpenCapi PCI config Addr/Data registers are reachable through
the Generation-ID Registers MMIO BARS.
The Config Address and Data registers are located at the following offsets
from the AFU Config BAR plus 320 KB.
• Config Address for Brick 0 – Offset 0
• Config Data for Brick 0 – Offsets:
◦ 128 – 4-byte config register
• Config Address for Brick 1 – Offset 256
• Config Data for Brick 1 – Offsets:
◦ 384 – 4-byte config register
Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci-opal.c')
-rw-r--r-- | core/pci-opal.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/pci-opal.c b/core/pci-opal.c index aa375c6..acbcd2a 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -748,7 +748,8 @@ static void rescan_slot_devices(struct pci_slot *slot) * prepare_link_change() is called (if needed) by the state * machine during the slot reset or link polling */ - if (phb->phb_type != phb_type_npu_v2_opencapi) { + if ((phb->phb_type != phb_type_npu_v2_opencapi) && + (phb->phb_type != phb_type_pau_opencapi)) { pci_scan_bus(phb, pd->secondary_bus, pd->subordinate_bus, &pd->children, pd, true); pci_add_device_nodes(phb, &pd->children, pd->dn, @@ -766,7 +767,8 @@ static void remove_slot_devices(struct pci_slot *slot) struct phb *phb = slot->phb; struct pci_device *pd = slot->pd; - if (phb->phb_type != phb_type_npu_v2_opencapi) + if ((phb->phb_type != phb_type_npu_v2_opencapi) && + (phb->phb_type != phb_type_pau_opencapi)) pci_remove_bus(phb, &pd->children); else pci_remove_bus(phb, &phb->devices); @@ -817,7 +819,8 @@ static bool training_needed(struct pci_slot *slot) struct pci_device *pd = slot->pd; /* only for opencapi slots for now */ - if (!pd && phb->phb_type == phb_type_npu_v2_opencapi) + if (!pd && ((phb->phb_type == phb_type_npu_v2_opencapi) || + (phb->phb_type == phb_type_pau_opencapi))) return true; return false; } |