]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/85xx/mpc85xx_cds.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / 85xx / mpc85xx_cds.c
index 4d063eec62107fe6a38adfe75de5218e04af7b08..aeb6a5bc55222a26ed4333cb503adf7f0cfc3846 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/fsl_devices.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -222,9 +223,6 @@ static int mpc85xx_cds_8259_attach(void)
        struct device_node *cascade_node = NULL;
        int cascade_irq;
 
-       if (!machine_is(mpc85xx_cds))
-               return 0;
-
        /* Initialize the i8259 controller */
        for_each_node_by_type(np, "interrupt-controller")
                if (of_device_is_compatible(np, "chrp,iic")) {
@@ -262,8 +260,7 @@ static int mpc85xx_cds_8259_attach(void)
 
        return 0;
 }
-
-device_initcall(mpc85xx_cds_8259_attach);
+machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
 
 #endif /* CONFIG_PPC_I8259 */
 
@@ -310,7 +307,6 @@ static void __init mpc85xx_cds_setup_arch(void)
 static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
 {
        uint pvid, svid, phid1;
-       uint memsize = total_memory;
 
        pvid = mfspr(SPRN_PVR);
        svid = mfspr(SPRN_SVR);
@@ -323,9 +319,6 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
        /* Display cpu Pll setting */
        phid1 = mfspr(SPRN_HID1);
        seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
-
-       /* Display the amount of memory */
-       seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
 }
 
 
@@ -339,6 +332,19 @@ 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", },
+       {},
+};
+
+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);
+
 define_machine(mpc85xx_cds) {
        .name           = "MPC85xx CDS",
        .probe          = mpc85xx_cds_probe,