Commit 3a5e517b authored by Markus Schneider-Pargmann's avatar Markus Schneider-Pargmann Committed by Mark Brown
Browse files

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: default avatarMarkus Pargmann <mpa@pengutronix.de>
Tested-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent de623ece
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -51,6 +51,10 @@ Optional properties:
		    filter the codec stream. This is necessary for some boards
		    filter the codec stream. This is necessary for some boards
		    where an incompatible codec is connected to this SSI, e.g.
		    where an incompatible codec is connected to this SSI, e.g.
		    on pca100 and pcm043.
		    on pca100 and pcm043.
- dmas:		    Generic dma devicetree binding as described in
		    Documentation/devicetree/bindings/dma/dma.txt.
- dma-names:	    Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
		    is not defined.


Child 'codec' node required properties:
Child 'codec' node required properties:
- compatible:       Compatible list, contains the name of the codec
- compatible:       Compatible list, contains the name of the codec
+12 −8
Original line number Original line Diff line number Diff line
@@ -794,16 +794,20 @@ static int fsl_ssi_probe(struct platform_device *pdev)
			&ssi_private->filter_data_tx;
			&ssi_private->filter_data_tx;
		ssi_private->dma_params_rx.filter_data =
		ssi_private->dma_params_rx.filter_data =
			&ssi_private->filter_data_rx;
			&ssi_private->filter_data_rx;
		if (!of_property_read_bool(pdev->dev.of_node, "dmas") &&
				ssi_private->use_dma) {
			/*
			/*
		 * TODO: This is a temporary solution and should be changed
			 * FIXME: This is a temporary solution until all
		 * to use generic DMA binding later when the helplers get in.
			 * necessary dma drivers support the generic dma
			 * bindings.
			 */
			 */
			ret = of_property_read_u32_array(pdev->dev.of_node,
			ret = of_property_read_u32_array(pdev->dev.of_node,
					"fsl,ssi-dma-events", dma_events, 2);
					"fsl,ssi-dma-events", dma_events, 2);
		if (ret && !ssi_private->use_dma) {
			if (ret && ssi_private->use_dma) {
			dev_err(&pdev->dev, "could not get dma events\n");
				dev_err(&pdev->dev, "could not get dma events but fsl-ssi is configured to use DMA\n");
				goto error_clk;
				goto error_clk;
			}
			}
		}


		shared = of_device_is_compatible(of_get_parent(np),
		shared = of_device_is_compatible(of_get_parent(np),
			    "fsl,spba-bus");
			    "fsl,spba-bus");