* [PATCH v4] sysdev,mv64x60: MV64x60 device bus
@ 2008-04-30 16:47 Remi Machet
2008-04-30 23:54 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Remi Machet @ 2008-04-30 16:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Stephen Rothwell
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)
---
Changes:
v2: Use the compatible field to detect devices to register (on Dale Farnsworth
suggestion).
v3: Added __initdata to variable of_mv64x60_devices (thanks to Stephen Rothwell
for pointing that out).
v4: Re-wrote the patch description.
arch/powerpc/sysdev/mv64x60_dev.c | 10 ++++++++++
1 files changed, 10 insertions(+)
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 41af122..c38695e 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
*/
@@ -482,6 +488,10 @@ static int __init mv64x60_device_setup(void)
of_node_put(np);
}
+ /* Now add every node that is on the device bus (type is devicectrl */
+ for_each_compatible_node(np, NULL, "marvell,mv64360")
+ of_platform_bus_probe(np, of_mv64x60_devices, NULL);
+
return 0;
}
arch_initcall(mv64x60_device_setup);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4] sysdev,mv64x60: MV64x60 device bus
2008-04-30 16:47 [PATCH v4] sysdev,mv64x60: MV64x60 device bus Remi Machet
@ 2008-04-30 23:54 ` Stephen Rothwell
2008-05-01 0:37 ` Remi Machet
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2008-04-30 23:54 UTC (permalink / raw)
To: Remi Machet; +Cc: linuxppc-dev, Paul Mackerras
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Hi Remi,
On Wed, 30 Apr 2008 09:47:16 -0700 Remi Machet <rmachet@slac.stanford.edu> wrote:
>
> 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)
You really should use '<' and '>' to surround your email address.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] sysdev,mv64x60: MV64x60 device bus
2008-04-30 23:54 ` Stephen Rothwell
@ 2008-05-01 0:37 ` Remi Machet
0 siblings, 0 replies; 3+ messages in thread
From: Remi Machet @ 2008-05-01 0:37 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras
Yes, I am sorry. I will post another patch in a few minutes ...
Remi
On Thu, 2008-05-01 at 09:54 +1000, Stephen Rothwell wrote:
> Hi Remi,
>
> On Wed, 30 Apr 2008 09:47:16 -0700 Remi Machet <rmachet@slac.stanford.edu> wrote:
> >
> > 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)
>
> You really should use '<' and '>' to surround your email address.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-01 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 16:47 [PATCH v4] sysdev,mv64x60: MV64x60 device bus Remi Machet
2008-04-30 23:54 ` Stephen Rothwell
2008-05-01 0:37 ` Remi Machet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).