powerpc/83xx: don't probe broken PCI on mpc837x_mds boards

Submitted by Anton Vorontsov on Oct. 2, 2008, 3:18 p.m.

Details

Message ID 20081002151852.GA8823@oksana.dev.rtsoft.ru
State Accepted, archived
Commit 62666828bae7057835d982367e98716a1bd0fd40
Headers show

Commit Message

Anton Vorontsov Oct. 2, 2008, 3:18 p.m.
In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.

When there is no PCI arbiter on the bus the u-boot marks the PCI
bus as broken and we should not try to probe it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/platforms/83xx/mpc837x_mds.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Comments

Kumar Gala Oct. 2, 2008, 7:48 p.m.
On Oct 2, 2008, at 10:18 AM, Anton Vorontsov wrote:

> In the standalone setup the board's CPLD disables the PCI internal
> arbiter, thus any access to the PCI bus will hang the board.
>
> When there is no PCI arbiter on the bus the u-boot marks the PCI
> bus as broken and we should not try to probe it.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Can you add to the commit message something about using the 'status  
field in the device tree to determine if the pci controller is  
available'

- k

Patch hide | download patch | download mbox

diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index be62de2..8bb13c8 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -85,8 +85,14 @@  static void __init mpc837x_mds_setup_arch(void)
 		ppc_md.progress("mpc837x_mds_setup_arch()", 0);
 
 #ifdef CONFIG_PCI
-	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
+	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
+		if (!of_device_is_available(np)) {
+			pr_warning("%s: disabled by the firmware.\n",
+				   np->full_name);
+			continue;
+		}
 		mpc83xx_add_bridge(np);
+	}
 #endif
 	mpc837xmds_usb_cfg();
 }