Skip to content

Commit

Permalink
powerpc/4xx: Allow 4xx PCI bridge to be disabled via device tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthias Fuchs authored and Josh Boyer committed Oct 2, 2008
1 parent fbcc4ba commit 5a013fc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion arch/powerpc/sysdev/ppc4xx_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5a013fc

Please sign in to comment.