Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / platforms / 85xx / sbc8548.c
index 14632a971225c7b497f51e13c61c9bf2ce49db20..1677b8a22677ffe8e1d50a9497520c7babfb8823 100644 (file)
 #include <sysdev/fsl_soc.h>
 #include <sysdev/fsl_pci.h>
 
+#include "mpc85xx.h"
+
 static int sbc_rev;
 
 static void __init sbc8548_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_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
+       struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
                        0, 256, " OpenPIC  ");
        BUG_ON(mpic == NULL);
-
-       /* Return the mpic node */
-       of_node_put(np);
-
        mpic_init(mpic);
 }
 
@@ -149,21 +129,7 @@ static void sbc8548_show_cpuinfo(struct seq_file *m)
        seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
 }
 
-static struct of_device_id __initdata of_bus_ids[] = {
-       { .name = "soc", },
-       { .type = "soc", },
-       { .compatible = "simple-bus", },
-       { .compatible = "gianfar", },
-       {},
-};
-
-static int __init declare_of_platform_devices(void)
-{
-       of_platform_bus_probe(NULL, of_bus_ids, NULL);
-
-       return 0;
-}
-machine_device_initcall(sbc8548, declare_of_platform_devices);
+machine_device_initcall(sbc8548, mpc85xx_common_publish_devices);
 
 /*
  * Called very early, device-tree isn't unflattened