aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2013-07-27 07:31:54 -0400
committerMark Brown <broonie@linaro.org>2013-08-06 12:59:29 -0400
commit3a5e517bb2e9856fd836e90caa415f116d34bd04 (patch)
treedf5932b41278be473d13752edb74b10cf38564c4
parentde623ece5be03e4447dbe08eaca30c92202a34a2 (diff)
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>
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,ssi.txt4
-rw-r--r--sound/soc/fsl/fsl_ssi.c20
2 files changed, 16 insertions, 8 deletions
diff --git a/Documentation/devicetree/bindings/sound/fsl,ssi.txt b/Documentation/devicetree/bindings/sound/fsl,ssi.txt
index e45cbce9cbf3..088a2c038f01 100644
--- a/Documentation/devicetree/bindings/sound/fsl,ssi.txt
+++ b/Documentation/devicetree/bindings/sound/fsl,ssi.txt
@@ -51,6 +51,10 @@ Optional properties:
51 filter the codec stream. This is necessary for some boards 51 filter the codec stream. This is necessary for some boards
52 where an incompatible codec is connected to this SSI, e.g. 52 where an incompatible codec is connected to this SSI, e.g.
53 on pca100 and pcm043. 53 on pca100 and pcm043.
54- dmas: Generic dma devicetree binding as described in
55 Documentation/devicetree/bindings/dma/dma.txt.
56- dma-names: Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
57 is not defined.
54 58
55Child 'codec' node required properties: 59Child 'codec' node required properties:
56- compatible: Compatible list, contains the name of the codec 60- compatible: Compatible list, contains the name of the codec
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 8b075ef5c6b9..0c072ff10875 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)
794 &ssi_private->filter_data_tx; 794 &ssi_private->filter_data_tx;
795 ssi_private->dma_params_rx.filter_data = 795 ssi_private->dma_params_rx.filter_data =
796 &ssi_private->filter_data_rx; 796 &ssi_private->filter_data_rx;
797 /* 797 if (!of_property_read_bool(pdev->dev.of_node, "dmas") &&
798 * TODO: This is a temporary solution and should be changed 798 ssi_private->use_dma) {
799 * to use generic DMA binding later when the helplers get in. 799 /*
800 */ 800 * FIXME: This is a temporary solution until all
801 ret = of_property_read_u32_array(pdev->dev.of_node, 801 * necessary dma drivers support the generic dma
802 * bindings.
803 */
804 ret = of_property_read_u32_array(pdev->dev.of_node,
802 "fsl,ssi-dma-events", dma_events, 2); 805 "fsl,ssi-dma-events", dma_events, 2);
803 if (ret && !ssi_private->use_dma) { 806 if (ret && ssi_private->use_dma) {
804 dev_err(&pdev->dev, "could not get dma events\n"); 807 dev_err(&pdev->dev, "could not get dma events but fsl-ssi is configured to use DMA\n");
805 goto error_clk; 808 goto error_clk;
809 }
806 } 810 }
807 811
808 shared = of_device_is_compatible(of_get_parent(np), 812 shared = of_device_is_compatible(of_get_parent(np),