]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc/4xx: Allow 4xx PCI bridge to be disabled via device tree
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>
Wed, 10 Sep 2008 05:55:46 +0000 (05:55 +0000)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Thu, 2 Oct 2008 15:59:01 +0000 (11:59 -0400)
This patch allows the 4xx (conventional) PCI bridge to be disabled
via the device tree. This is needed for 4xx PCI adapter hardware.

Use the PCI node's status property to disable the PCI bridge.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
arch/powerpc/sysdev/ppc4xx_pci.c

index 5da8a44ea2f66abf085b32fc17987e8b1e65ddf1..9f6f73d584d62c20ce5650cecd4dbe7e3917d865 100644 (file)
@@ -276,9 +276,16 @@ static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
        const int *bus_range;
        int primary = 0;
 
+       /* Check if device is enabled */
+       if (!of_device_is_available(np)) {
+               printk(KERN_INFO "%s: Port disabled via device-tree\n",
+                      np->full_name);
+               return;
+       }
+
        /* Fetch config space registers address */
        if (of_address_to_resource(np, 0, &rsrc_cfg)) {
-               printk(KERN_ERR "%s:Can't get PCI config register base !",
+               printk(KERN_ERR "%s: Can't get PCI config register base !",
                       np->full_name);
                return;
        }