Commit 32bd8cd2 authored by Nicolin Chen's avatar Nicolin Chen Committed by Mark Brown

ASoC: fsl: Set sdma peripheral type directly

Let CPU DAI drivers set SDMA periperal type directly to support more
dma types(SPDIF, ESAI) other than only two for SSI.
This will easily allow some non-SSI drivers to use the imx-pcm-dma
as well.
Signed-off-by: default avatarNicolin Chen <b42378@freescale.com>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 72192366
...@@ -775,9 +775,9 @@ static int fsl_ssi_probe(struct platform_device *pdev) ...@@ -775,9 +775,9 @@ static int fsl_ssi_probe(struct platform_device *pdev)
"fsl,spba-bus"); "fsl,spba-bus");
imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx, imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx,
dma_events[0], shared); dma_events[0], shared ? IMX_DMATYPE_SSI_SP : IMX_DMATYPE_SSI);
imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx, imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx,
dma_events[1], shared); dma_events[1], shared ? IMX_DMATYPE_SSI_SP : IMX_DMATYPE_SSI);
} }
/* Initialize the the device_attribute structure */ /* Initialize the the device_attribute structure */
......
...@@ -22,14 +22,11 @@ ...@@ -22,14 +22,11 @@
static inline void static inline void
imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data, imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
int dma, bool shared) int dma, enum sdma_peripheral_type peripheral_type)
{ {
dma_data->dma_request = dma; dma_data->dma_request = dma;
dma_data->priority = DMA_PRIO_HIGH; dma_data->priority = DMA_PRIO_HIGH;
if (shared) dma_data->peripheral_type = peripheral_type;
dma_data->peripheral_type = IMX_DMATYPE_SSI_SP;
else
dma_data->peripheral_type = IMX_DMATYPE_SSI;
} }
struct imx_pcm_fiq_params { struct imx_pcm_fiq_params {
......
...@@ -571,13 +571,13 @@ static int imx_ssi_probe(struct platform_device *pdev) ...@@ -571,13 +571,13 @@ static int imx_ssi_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0"); res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0");
if (res) { if (res) {
imx_pcm_dma_params_init_data(&ssi->filter_data_tx, res->start, imx_pcm_dma_params_init_data(&ssi->filter_data_tx, res->start,
false); IMX_DMATYPE_SSI);
} }
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0"); res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0");
if (res) { if (res) {
imx_pcm_dma_params_init_data(&ssi->filter_data_rx, res->start, imx_pcm_dma_params_init_data(&ssi->filter_data_rx, res->start,
false); IMX_DMATYPE_SSI);
} }
platform_set_drvdata(pdev, ssi); platform_set_drvdata(pdev, ssi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment