powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
[deliverable/linux.git] / arch / powerpc / platforms / 83xx / mpc837x_mds.c
index 8a9c26973605d918259acd874e7d5c627eb631fe..8bb13c807142c9155940da690e26cdc6b8de48cc 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/ipic.h>
 #include <asm/udbg.h>
 #include <asm/prom.h>
+#include <sysdev/fsl_pci.h>
 
 #include "mpc83xx.h"
 
@@ -39,12 +40,9 @@ static int mpc837xmds_usb_cfg(void)
        if (ret)
                return ret;
        /* Map BCSR area */
-       np = of_find_node_by_name(NULL, "bcsr");
+       np = of_find_compatible_node(NULL, NULL, "fsl,mpc837xmds-bcsr");
        if (np) {
-               struct resource res;
-
-               of_address_to_resource(np, 0, &res);
-               bcsr_regs = ioremap(res.start, res.end - res.start + 1);
+               bcsr_regs = of_iomap(np, 0);
                of_node_put(np);
        }
        if (!bcsr_regs)
@@ -87,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();
 }
@@ -96,6 +100,7 @@ static void __init mpc837x_mds_setup_arch(void)
 static struct of_device_id mpc837x_ids[] = {
        { .type = "soc", },
        { .compatible = "soc", },
+       { .compatible = "simple-bus", },
        {},
 };
 
This page took 0.031291 seconds and 5 git commands to generate.