Browse Source

powerpc/85xx: Don't add disabled PCIe devices

PCIe nodes with the property status="disabled" are not usable and so
avoid adding "disabled" PCIe bridge with the system.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Prabhakar Kushwaha 14 years ago
parent
commit
ef1fd2df85
1 changed files with 5 additions and 0 deletions
  1. 5 0
      arch/powerpc/sysdev/fsl_pci.c

+ 5 - 0
arch/powerpc/sysdev/fsl_pci.c

@@ -324,6 +324,11 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
 	struct resource rsrc;
 	const int *bus_range;
 
+	if (!of_device_is_available(dev)) {
+		pr_warning("%s: disabled\n", dev->full_name);
+		return -ENODEV;
+	}
+
 	pr_debug("Adding PCI host bridge %s\n", dev->full_name);
 
 	/* Fetch host bridge registers address */