summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mv64x60_dev.c
diff options
context:
space:
mode:
authorRemi Machet <rmachet@slac.stanford.edu>2008-05-01 10:40:44 +1000
committerPaul Mackerras <paulus@samba.org>2008-05-14 22:31:41 +1000
commit683307da07afd3a7ee55269ee8cb70c8053b0923 (patch)
tree5e18139868c02c14f95a61afb85855065a71315e /arch/powerpc/sysdev/mv64x60_dev.c
parent663276b7c6340e755ed62bed67a2b96f4fc3d513 (diff)
downloadblackbird-op-linux-683307da07afd3a7ee55269ee8cb70c8053b0923.tar.gz
blackbird-op-linux-683307da07afd3a7ee55269ee8cb70c8053b0923.zip
[POWERPC] Create of_buses for MV64x60 devices
For each mv64360 entry in the OpenFirmware database, add the registration of an of_bus to take care of devices connected to the MV64x60 asynchronous devices controller. This change makes it possible for those devices to be detected by drivers that support the of_platform without having a custom call for each of them in the board file. Signed-off-by: Remi Machet <rmachet@slac.stanford.edu> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/mv64x60_dev.c')
-rw-r--r--arch/powerpc/sysdev/mv64x60_dev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index a132e0de8ca5..32e0ad0ebea8 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -15,6 +15,7 @@
#include <linux/console.h>
#include <linux/mv643xx.h>
#include <linux/platform_device.h>
+#include <linux/of_platform.h>
#include <asm/prom.h>
@@ -25,6 +26,11 @@
* PowerPC of_platform_bus_type. They support platform_bus_type instead.
*/
+static struct of_device_id __initdata of_mv64x60_devices[] = {
+ { .compatible = "marvell,mv64306-devctrl", },
+ {}
+};
+
/*
* Create MPSC platform devices
*/
@@ -484,6 +490,10 @@ static int __init mv64x60_device_setup(void)
of_node_put(np);
}
+ /* Now add every node that is on the device bus */
+ for_each_compatible_node(np, NULL, "marvell,mv64360")
+ of_platform_bus_probe(np, of_mv64x60_devices, NULL);
+
return 0;
}
arch_initcall(mv64x60_device_setup);
OpenPOWER on IntegriCloud