All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage
@ 2013-07-23  8:46 Jean-Francois Moine
  2013-07-23 12:57 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Francois Moine @ 2013-07-23  8:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Rob Herring, Russell King, alsa-devel, linux-kernel,
	devicetree-discuss

The kirkwood pcm/dma driver is used without DT in the Kirkwood machine.
This patch adds a DT compatible definition for use in other Marvell
machines as the Armada 88AP510 (Dove).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
 Documentation/devicetree/bindings/sound/kirkwood-dma.txt | 11 +++++++++++
 sound/soc/kirkwood/kirkwood-dma.c                        | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/kirkwood-dma.txt b/Documentation/devicetree/bindings/sound/kirkwood-dma.txt
new file mode 100644
index 0000000..9dd2989
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/kirkwood-dma.txt
@@ -0,0 +1,11 @@
+* mvebu (Kirkwood, Dove, Armada 370) PCM/DMA controller
+
+Required properties:
+
+- compatible: "marvell,mvebu-pcm-audio"
+
+Example:
+
+pcm: pcm {
+	compatible = "marvell,mvebu-pcm-audio";
+};
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c
index a9f1453..b91045a 100644
--- a/sound/soc/kirkwood/kirkwood-dma.c
+++ b/sound/soc/kirkwood/kirkwood-dma.c
@@ -19,6 +19,8 @@
 #include <linux/dma-mapping.h>
 #include <linux/mbus.h>
 #include <sound/soc.h>
+#include <linux/of.h>
+
 #include "kirkwood.h"
 
 #define KIRKWOOD_RATES \
@@ -383,10 +385,19 @@ static int kirkwood_soc_platform_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id kirkwood_pcm_of_match[] = {
+	{ .compatible = "marvell,mvebu-pcm-audio" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, kirkwood_pcm_of_match);
+#endif
+
 static struct platform_driver kirkwood_pcm_driver = {
 	.driver = {
 			.name = "kirkwood-pcm-audio",
 			.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(kirkwood_pcm_of_match),
 	},
 
 	.probe = kirkwood_soc_platform_probe,


-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage
  2013-07-23  8:46 [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage Jean-Francois Moine
@ 2013-07-23 12:57 ` Mark Brown
  2013-07-23 13:23     ` Russell King - ARM Linux
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-07-23 12:57 UTC (permalink / raw)
  To: Jean-Francois Moine
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Rob Herring,
	Russell King, alsa-devel, linux-kernel, devicetree-discuss

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

On Tue, Jul 23, 2013 at 10:46:41AM +0200, Jean-Francois Moine wrote:

> +- compatible: "marvell,mvebu-pcm-audio"
> +
> +Example:
> +
> +pcm: pcm {
> +	compatible = "marvell,mvebu-pcm-audio";
> +};

This device has no registers or other hardware - this looks like a stub
device which shouldn't be visible in DT but should instead be created by
the I2S driver - look at how most of the other DT platforms using
dmaengine work.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage
  2013-07-23 12:57 ` Mark Brown
@ 2013-07-23 13:23     ` Russell King - ARM Linux
  0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2013-07-23 13:23 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jean-Francois Moine, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Rob Herring, alsa-devel, linux-kernel,
	devicetree-discuss

On Tue, Jul 23, 2013 at 01:57:56PM +0100, Mark Brown wrote:
> On Tue, Jul 23, 2013 at 10:46:41AM +0200, Jean-Francois Moine wrote:
> 
> > +- compatible: "marvell,mvebu-pcm-audio"
> > +
> > +Example:
> > +
> > +pcm: pcm {
> > +	compatible = "marvell,mvebu-pcm-audio";
> > +};
> 
> This device has no registers or other hardware - this looks like a stub
> device which shouldn't be visible in DT but should instead be created by
> the I2S driver - look at how most of the other DT platforms using
> dmaengine work.

There is no separate DMA engine on this platform.  dmaengine is totally
irrelevant to this hardware.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage
@ 2013-07-23 13:23     ` Russell King - ARM Linux
  0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2013-07-23 13:23 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel,
	Liam Girdwood, Rob Herring, devicetree-discuss

On Tue, Jul 23, 2013 at 01:57:56PM +0100, Mark Brown wrote:
> On Tue, Jul 23, 2013 at 10:46:41AM +0200, Jean-Francois Moine wrote:
> 
> > +- compatible: "marvell,mvebu-pcm-audio"
> > +
> > +Example:
> > +
> > +pcm: pcm {
> > +	compatible = "marvell,mvebu-pcm-audio";
> > +};
> 
> This device has no registers or other hardware - this looks like a stub
> device which shouldn't be visible in DT but should instead be created by
> the I2S driver - look at how most of the other DT platforms using
> dmaengine work.

There is no separate DMA engine on this platform.  dmaengine is totally
irrelevant to this hardware.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage
  2013-07-23 13:23     ` Russell King - ARM Linux
@ 2013-07-23 13:29       ` Mark Brown
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-07-23 13:29 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jean-Francois Moine, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Rob Herring, alsa-devel, linux-kernel,
	devicetree-discuss

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Tue, Jul 23, 2013 at 02:23:14PM +0100, Russell King - ARM Linux wrote:
> On Tue, Jul 23, 2013 at 01:57:56PM +0100, Mark Brown wrote:

> > This device has no registers or other hardware - this looks like a stub
> > device which shouldn't be visible in DT but should instead be created by
> > the I2S driver - look at how most of the other DT platforms using
> > dmaengine work.

> There is no separate DMA engine on this platform.  dmaengine is totally
> irrelevant to this hardware.

The pattern for instantiating a DMA controller that's integrated into
the DAI is the same as that where the DMA controller is a shared IP
accessed via dmaengine so it's still useful to look at these platforms
to see how to do the instnatiation.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage
@ 2013-07-23 13:29       ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-07-23 13:29 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel,
	Liam Girdwood, Rob Herring, devicetree-discuss


[-- Attachment #1.1: Type: text/plain, Size: 732 bytes --]

On Tue, Jul 23, 2013 at 02:23:14PM +0100, Russell King - ARM Linux wrote:
> On Tue, Jul 23, 2013 at 01:57:56PM +0100, Mark Brown wrote:

> > This device has no registers or other hardware - this looks like a stub
> > device which shouldn't be visible in DT but should instead be created by
> > the I2S driver - look at how most of the other DT platforms using
> > dmaengine work.

> There is no separate DMA engine on this platform.  dmaengine is totally
> irrelevant to this hardware.

The pattern for instantiating a DMA controller that's integrated into
the DAI is the same as that where the DMA controller is a shared IP
accessed via dmaengine so it's still useful to look at these platforms
to see how to do the instnatiation.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-23 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23  8:46 [PATCH] ARM: kirkwood: extend the kirkwood pcm/dma driver for DT usage Jean-Francois Moine
2013-07-23 12:57 ` Mark Brown
2013-07-23 13:23   ` Russell King - ARM Linux
2013-07-23 13:23     ` Russell King - ARM Linux
2013-07-23 13:29     ` Mark Brown
2013-07-23 13:29       ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.