]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/85xx/socrates.c
powerpc/mpic: Search for open-pic device-tree node if NULL
[karo-tx-linux.git] / arch / powerpc / platforms / 85xx / socrates.c
index 747d8fb3ab82af2c5e26ddfd3e91966bb799bbc3..8175f0a5e5f097818c8fad4753eb65895630dc3d 100644 (file)
 #include <sysdev/fsl_soc.h>
 #include <sysdev/fsl_pci.h>
 
+#include "mpc85xx.h"
 #include "socrates_fpga_pic.h"
 
 static void __init socrates_pic_init(void)
 {
-       struct mpic *mpic;
-       struct resource r;
        struct device_node *np;
 
-       np = of_find_node_by_type(NULL, "open-pic");
-       if (!np) {
-               printk(KERN_ERR "Could not find open-pic node\n");
-               return;
-       }
-
-       if (of_address_to_resource(np, 0, &r)) {
-               printk(KERN_ERR "Could not map mpic register space\n");
-               of_node_put(np);
-               return;
-       }
-
-       mpic = mpic_alloc(np, r.start,
+       struct mpic *mpic = mpic_alloc(NULL, 0,
                        MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
                        0, 256, " OpenPIC  ");
        BUG_ON(mpic == NULL);
-       of_node_put(np);
-
        mpic_init(mpic);
 
        np = of_find_compatible_node(NULL, NULL, "abb,socrates-fpga-pic");
@@ -96,17 +81,7 @@ static void __init socrates_setup_arch(void)
 #endif
 }
 
-static struct of_device_id __initdata socrates_of_bus_ids[] = {
-       { .compatible = "simple-bus", },
-       { .compatible = "gianfar", },
-       {},
-};
-
-static int __init socrates_publish_devices(void)
-{
-       return of_platform_bus_probe(NULL, socrates_of_bus_ids, NULL);
-}
-machine_device_initcall(socrates, socrates_publish_devices);
+machine_device_initcall(socrates, mpc85xx_common_publish_devices);
 
 /*
  * Called very early, device-tree isn't unflattened