summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/pci.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2017-01-10 05:41:44 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2017-01-30 10:34:53 +0100
commit616badd2fb499320d3ac3b54462f55dededd0e0f (patch)
tree9bf17ff7ec554e7f5ae825ec9ba04fd177add268 /arch/powerpc/platforms/powernv/pci.c
parentpowerpc/powernv: Initialise nest mmu (diff)
downloadlinux-616badd2fb499320d3ac3b54462f55dededd0e0f.tar.xz
linux-616badd2fb499320d3ac3b54462f55dededd0e0f.zip
powerpc/powernv: Use OPAL call for TCE kill on NVLink2
Add detection of NPU2 PHBs. NPU2/NVLink2 has a different register layout for the TCE kill register therefore TCE invalidation should be done via the OPAL call rather than using the register directly as it is for PHB3 and NVLink1. This changes TCE invalidation to use the OPAL call in the case of a NPU2 PHB model. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci.c')
-rw-r--r--arch/powerpc/platforms/powernv/pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index c6d554fe585c..eb835e977e33 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -940,6 +940,13 @@ void __init pnv_pci_init(void)
for_each_compatible_node(np, NULL, "ibm,ioda2-npu-phb")
pnv_pci_init_npu_phb(np);
+ /*
+ * Look for NPU2 PHBs which we treat mostly as NPU PHBs with
+ * the exception of TCE kill which requires an OPAL call.
+ */
+ for_each_compatible_node(np, NULL, "ibm,ioda2-npu2-phb")
+ pnv_pci_init_npu_phb(np);
+
/* Configure IOMMU DMA hooks */
set_pci_dma_ops(&dma_iommu_ops);
}