diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2013-07-27 13:31:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-06 17:59:29 +0100 |
commit | 3a5e517bb2e9856fd836e90caa415f116d34bd04 (patch) | |
tree | df5932b41278be473d13752edb74b10cf38564c4 /sound/soc/fsl/fsl_ssi.c | |
parent | de623ece5be03e4447dbe08eaca30c92202a34a2 (diff) | |
download | kernel_goldelico_gta04-3a5e517bb2e9856fd836e90caa415f116d34bd04.zip kernel_goldelico_gta04-3a5e517bb2e9856fd836e90caa415f116d34bd04.tar.gz kernel_goldelico_gta04-3a5e517bb2e9856fd836e90caa415f116d34bd04.tar.bz2 |
ASoC: fsl-ssi: Use generic DMA bindings if possible
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 8b075ef..0c072ff 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -794,15 +794,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), |