From: Matthias Fuchs Date: Wed, 10 Sep 2008 05:55:46 +0000 (+0000) Subject: powerpc/4xx: Allow 4xx PCI bridge to be disabled via device tree X-Git-Tag: v2.6.28-rc1~569^2~46^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a013fc7bb48acefe94011f4b83fef95b381f875;p=karo-tx-linux.git powerpc/4xx: Allow 4xx PCI bridge to be disabled via device tree 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 Acked-by: Stefan Roese Signed-off-by: Josh Boyer --- diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 5da8a44ea2f6..9f6f73d584d6 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -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; }