]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc/85xx: publish of device for cds platforms
authorDave Jiang <djiang@mvista.com>
Mon, 16 Jun 2008 22:36:17 +0000 (15:36 -0700)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 14 Jul 2008 12:55:43 +0000 (07:55 -0500)
Publish the devices listed in dts under SOC as of_device for 85xx_cds
platform. The devices are needed by the 85xx EDAC driver.

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/85xx/mpc85xx_cds.c

index 8b1de7884be6e8d8e0d2182ec5fc04149f8209a8..50d7ea8f922b4d0addd159af5e518f6cb05b2f30 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>
@@ -335,6 +336,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,