summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-08 08:37:17 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-17 08:42:49 +0200
commit08a45b320a0ec76866acca7db2fe2647387e5c21 (patch)
treed52230dd5d911385138dd03357774181de5a3c65 /arch/powerpc/platforms
parentpowerpc/powernv/pci: Use the device-tree to get available range of M64's (diff)
downloadlinux-08a45b320a0ec76866acca7db2fe2647387e5c21.tar.xz
linux-08a45b320a0ec76866acca7db2fe2647387e5c21.zip
powerpc/powernv/pci: Check status of a PHB before using it
If the firmware encounters an error (internal or HW) during initialization of a PHB, it might leave the device-node in the tree but mark it disabled using the "status" property. We should check it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index ed27f4cb28ca..891fc4a453df 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -3516,6 +3516,9 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
void *aux;
long rc;
+ if (!of_device_is_available(np))
+ return;
+
pr_info("Initializing %s PHB (%s)\n",
pnv_phb_names[ioda_type], of_node_full_name(np));