]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Mon, 6 Oct 2008 17:08:39 +0000 (21:08 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 13 Oct 2008 16:09:58 +0000 (11:09 -0500)
In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.

The common way to disable particular devices in the device tree is to
put the "status" property with any value other than "ok" or "okay"
into the device node we want to disable.

So, when there is no PCI arbiter on the bus the u-boot adds status =
"broken (no arbiter)" property into the PCI controller's node, and so
marks the PCI controller as unavailable.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/83xx/mpc837x_mds.c

index be62de23beadc1748a3d391c51578ddb74c0a4fc..8bb13c807142c9155940da690e26cdc6b8de48cc 100644 (file)
@@ -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();
 }