[PATCH] 85xx: publish of device for cds platforms
Dave Jiang
djiang at mvista.com
Tue Jun 17 07:32:44 EST 2008
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 at mvista.com>
---
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: 2.6.26-rc5-mm3/arch/powerpc/platforms/85xx/mpc85xx_cds.c
===================================================================
--- 2.6.26-rc5-mm3.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ 2.6.26-rc5-mm3/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -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", },
+ {},
+};
+
+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,
More information about the Linuxppc-dev
mailing list