powerpc/mpic: Search for open-pic device-tree node if NULL
[sfrench/cifs-2.6.git] / arch / powerpc / platforms / 85xx / corenet_ds.c
index 802ad110b75719780ea29547f9ef85c6b0863a8d..cfa4bada7eb28e3364f728a696e8ae34fd730ce6 100644 (file)
 #include <linux/of_platform.h>
 #include <sysdev/fsl_soc.h>
 #include <sysdev/fsl_pci.h>
+#include "smp.h"
 
 void __init corenet_ds_pic_init(void)
 {
        struct mpic *mpic;
-       struct resource r;
-       struct device_node *np = NULL;
        unsigned int flags = MPIC_PRIMARY | MPIC_BIG_ENDIAN |
                                MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU;
 
-       np = of_find_node_by_type(np, "open-pic");
-
-       if (np == NULL) {
-               printk(KERN_ERR "Could not find open-pic node\n");
-               return;
-       }
-
-       if (of_address_to_resource(np, 0, &r)) {
-               printk(KERN_ERR "Failed to map mpic register space\n");
-               of_node_put(np);
-               return;
-       }
-
        if (ppc_md.get_irq == mpic_get_coreint_irq)
                flags |= MPIC_ENABLE_COREINT;
 
-       mpic = mpic_alloc(np, r.start, flags, 0, 256, " OpenPIC  ");
+       mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC  ");
        BUG_ON(mpic == NULL);
 
        mpic_init(mpic);
@@ -65,10 +51,6 @@ void __init corenet_ds_pic_init(void)
 /*
  * Setup the architecture
  */
-#ifdef CONFIG_SMP
-void __init mpc85xx_smp_init(void);
-#endif
-
 void __init corenet_ds_setup_arch(void)
 {
 #ifdef CONFIG_PCI
@@ -77,9 +59,7 @@ void __init corenet_ds_setup_arch(void)
 #endif
        dma_addr_t max = 0xffffffff;
 
-#ifdef CONFIG_SMP
        mpc85xx_smp_init();
-#endif
 
 #ifdef CONFIG_PCI
        for_each_node_by_type(np, "pci") {
@@ -112,7 +92,7 @@ static const struct of_device_id of_device_ids[] __devinitconst = {
                .compatible     = "simple-bus"
        },
        {
-               .compatible     = "fsl,rapidio-delta",
+               .compatible     = "fsl,srio",
        },
        {
                .compatible     = "fsl,p4080-pcie",