aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2008-09-10 01:55:46 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-10-02 11:59:01 -0400
commit5a013fc7bb48acefe94011f4b83fef95b381f875 (patch)
treeedcd17541685d13415888c05eb4144ce0d99359a /arch/powerpc/sysdev
parentfbcc4bacee30cad4e4a13d05492a9ed0c9c3e8c7 (diff)
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 <matthias.fuchs@esd-electronics.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.c9
1 files changed, 8 insertions, 1 deletions
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)
276 const int *bus_range; 276 const int *bus_range;
277 int primary = 0; 277 int primary = 0;
278 278
279 /* Check if device is enabled */
280 if (!of_device_is_available(np)) {
281 printk(KERN_INFO "%s: Port disabled via device-tree\n",
282 np->full_name);
283 return;
284 }
285
279 /* Fetch config space registers address */ 286 /* Fetch config space registers address */
280 if (of_address_to_resource(np, 0, &rsrc_cfg)) { 287 if (of_address_to_resource(np, 0, &rsrc_cfg)) {
281 printk(KERN_ERR "%s:Can't get PCI config register base !", 288 printk(KERN_ERR "%s: Can't get PCI config register base !",
282 np->full_name); 289 np->full_name);
283 return; 290 return;
284 } 291 }