]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/85xx/mpc85xx_cds.c
powerpc/mpic: Search for open-pic device-tree node if NULL
[karo-tx-linux.git] / arch / powerpc / platforms / 85xx / mpc85xx_cds.c
index 66cb8d64079fa9e692fdd6deac3909ab05aa67d0..cf209b3df7b939f370a97aea986b2d60051056b5 100644 (file)
@@ -46,6 +46,8 @@
 #include <sysdev/fsl_soc.h>
 #include <sysdev/fsl_pci.h>
 
+#include "mpc85xx.h"
+
 /* CADMUS info */
 /* xxx - galak, move into device tree */
 #define CADMUS_BASE (0xf8004000)
@@ -177,7 +179,7 @@ static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id)
 
 static struct irqaction mpc85xxcds_8259_irqaction = {
        .handler = mpc85xx_8259_cascade_action,
-       .flags = IRQF_SHARED,
+       .flags = IRQF_SHARED | IRQF_NO_THREAD,
        .name = "8259 cascade",
 };
 #endif /* PPC_I8259 */
@@ -186,30 +188,10 @@ static struct irqaction mpc85xxcds_8259_irqaction = {
 static void __init mpc85xx_cds_pic_init(void)
 {
        struct mpic *mpic;
-       struct resource r;
-       struct device_node *np = NULL;
-
-       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;
-       }
-
-       mpic = mpic_alloc(np, r.start,
+       mpic = mpic_alloc(NULL, 0,
                        MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
                        0, 256, " OpenPIC  ");
        BUG_ON(mpic == NULL);
-
-       /* Return the mpic node */
-       of_node_put(np);
-
        mpic_init(mpic);
 }
 
@@ -330,19 +312,7 @@ static int __init mpc85xx_cds_probe(void)
         return of_flat_dt_is_compatible(root, "MPC85xxCDS");
 }
 
-static struct of_device_id __initdata of_bus_ids[] = {
-       { .type = "soc", },
-       { .compatible = "soc", },
-       { .compatible = "simple-bus", },
-       { .compatible = "gianfar", },
-       {},
-};
-
-static int __init declare_of_platform_devices(void)
-{
-       return of_platform_bus_probe(NULL, of_bus_ids, NULL);
-}
-machine_device_initcall(mpc85xx_cds, declare_of_platform_devices);
+machine_device_initcall(mpc85xx_cds, mpc85xx_common_publish_devices);
 
 define_machine(mpc85xx_cds) {
        .name           = "MPC85xx CDS",