From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 05/10] ASoC: fsl-ssi: Use generic DMA bindings if possible
Date: Thu, 20 Jun 2013 15:20:24 +0200 [thread overview]
Message-ID: <1371734429-6081-6-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1371734429-6081-1-git-send-email-mpa@pengutronix.de>
There may be some platforms using fsl-ssi that do not have a DMA driver
with generic DMA bindings. So this patch adds support for the generic
DMA bindings, while still accepting the old "fsl,dma-events" property if
"dmas" is not found.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
---
Notes:
Changes in v5:
- Not passing of_node now, instead setting the parent device
Changes in v4:
- Change TODO comment to a FIXME, to remove the old dma-events property as soon
as all dma drivers support the generic DMA bindings.
sound/soc/fsl/fsl_ssi.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 2fe4dbd..ed1fbbb 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -803,15 +803,19 @@ static int fsl_ssi_probe(struct platform_device *pdev)
&ssi_private->filter_data_tx;
ssi_private->dma_params_rx.filter_data =
&ssi_private->filter_data_rx;
- /*
- * TODO: This is a temporary solution and should be changed
- * to use generic DMA binding later when the helplers get in.
- */
- ret = of_property_read_u32_array(pdev->dev.of_node,
+ if (!of_property_read_bool(pdev->dev.of_node, "dmas") &&
+ ssi_private->use_dma) {
+ /*
+ * FIXME: This is a temporary solution until all
+ * necessary dma drivers support the generic dma
+ * bindings.
+ */
+ ret = of_property_read_u32_array(pdev->dev.of_node,
"fsl,ssi-dma-events", dma_events, 2);
- if (ret && !ssi_private->use_dma) {
- dev_err(&pdev->dev, "could not get dma events\n");
- goto error_clk;
+ if (ret && ssi_private->use_dma) {
+ dev_err(&pdev->dev, "could not get dma events but fsl-ssi is configured to use DMA\n");
+ goto error_clk;
+ }
}
shared = of_device_is_compatible(of_get_parent(np),
--
1.8.2.1
next prev parent reply other threads:[~2013-06-20 13:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 13:20 ASoC: fsl-ssi: ac97-slave support Markus Pargmann
2013-06-20 13:20 ` [PATCH v9 01/10] ASoC: imx-pcm-dma: DT support Markus Pargmann
2013-06-23 17:49 ` Timur Tabi
2013-07-05 13:56 ` Markus Pargmann
2013-07-03 16:02 ` Mark Brown
2013-06-20 13:20 ` [PATCH v9 02/10] ASoC: imx-pcm-fiq: Introduce pcm-fiq-params Markus Pargmann
2013-07-03 16:02 ` Mark Brown
2013-06-20 13:20 ` [PATCH v9 03/10] ASoC: fsl: Move soc_ac97_ops from imx-ssi to fsl_ssi Markus Pargmann
2013-07-03 16:07 ` Mark Brown
2013-06-20 13:20 ` [PATCH v9 04/10] ASoC: fsl-ssi: Add support for imx-pcm-fiq Markus Pargmann
2013-07-03 16:06 ` Mark Brown
2013-07-06 17:13 ` Markus Pargmann
2013-07-08 8:04 ` Mark Brown
2013-06-20 13:20 ` Markus Pargmann [this message]
2013-06-20 13:20 ` [PATCH v9 06/10] ASoC: fsl-ssi: imx ac97 support Markus Pargmann
2013-06-20 13:20 ` [PATCH v9 07/10] ARM: imx: Export ac97 reset functions Markus Pargmann
2013-06-20 13:20 ` [PATCH v9 08/10] ASoC: Add phycore-ac97-dt driver Markus Pargmann
2013-07-03 16:17 ` Mark Brown
2013-07-07 7:19 ` Markus Pargmann
2013-07-07 13:16 ` [alsa-devel] " Fabio Estevam
2013-07-08 7:19 ` Markus Pargmann
2013-07-08 8:06 ` Mark Brown
2013-06-20 13:20 ` [PATCH v9 09/10] ASoC: fsl: Move fsl-ssi binding doc to sound/ Markus Pargmann
2013-07-03 16:18 ` Mark Brown
2013-06-20 13:20 ` [PATCH v9 10/10] ASoC: fsl: Update fsl-ssi binding doc Markus Pargmann
2013-07-03 16:19 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371734429-6081-6-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).