diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 31 | ||||
-rw-r--r-- | sound/soc/fsl/imx-pcm-dma.c | 8 | ||||
-rw-r--r-- | sound/soc/fsl/imx-pcm.h | 5 | ||||
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 4 |
4 files changed, 11 insertions, 37 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2f2d837df07f..d1d1e976cb88 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -3,7 +3,7 @@ * * Author: Timur Tabi <timur@freescale.com> * - * Copyright 2007-2010 Freescale Semiconductor, Inc. + * Copyright (C) 2007-2013 Freescale Semiconductor, Inc. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any @@ -124,8 +124,6 @@ struct fsl_ssi_private { struct clk *clk; struct snd_dmaengine_dai_dma_data dma_params_tx; struct snd_dmaengine_dai_dma_data dma_params_rx; - struct imx_dma_data filter_data_tx; - struct imx_dma_data filter_data_rx; struct { unsigned int rfrc; @@ -662,7 +660,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) const uint32_t *iprop; struct resource res; char name[64]; - bool shared; /* SSIs that are not connected on the board should have a * status = "disabled" @@ -736,7 +733,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->fifo_depth = 8; if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx21-ssi")) { - u32 dma_events[2]; ssi_private->ssi_on_imx = true; ssi_private->clk = clk_get(&pdev->dev, NULL); @@ -759,28 +755,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0); ssi_private->dma_params_rx.addr = ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0); - ssi_private->dma_params_tx.filter_data = - &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, - "fsl,ssi-dma-events", dma_events, 2); - if (ret) { - dev_err(&pdev->dev, "could not get dma events\n"); - goto error_clk; - } - - shared = of_device_is_compatible(of_get_parent(np), - "fsl,spba-bus"); - - imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx, - dma_events[0], shared); - imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx, - dma_events[1], shared); } /* Initialize the the device_attribute structure */ @@ -808,7 +782,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) } if (ssi_private->ssi_on_imx) { - ret = imx_pcm_dma_init(pdev); + ret = imx_pcm_dma_init(pdev, SND_DMAENGINE_PCM_FLAG_NO_RESIDUE); if (ret) goto error_dev; } @@ -856,7 +830,6 @@ error_dev: dev_set_drvdata(&pdev->dev, NULL); device_remove_file(&pdev->dev, dev_attr); -error_clk: if (ssi_private->ssi_on_imx) { clk_disable_unprepare(ssi_private->clk); clk_put(ssi_private->clk); diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c index fde4d2ea68c8..b9447730f9df 100644 --- a/sound/soc/fsl/imx-pcm-dma.c +++ b/sound/soc/fsl/imx-pcm-dma.c @@ -60,12 +60,10 @@ static const struct snd_dmaengine_pcm_config imx_dmaengine_pcm_config = { .prealloc_buffer_size = IMX_SSI_DMABUF_SIZE, }; -int imx_pcm_dma_init(struct platform_device *pdev) +int imx_pcm_dma_init(struct platform_device *pdev, unsigned int flags) { - return snd_dmaengine_pcm_register(&pdev->dev, &imx_dmaengine_pcm_config, - SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | - SND_DMAENGINE_PCM_FLAG_NO_DT | - SND_DMAENGINE_PCM_FLAG_COMPAT); + return snd_dmaengine_pcm_register(&pdev->dev, + &imx_dmaengine_pcm_config, flags); } EXPORT_SYMBOL_GPL(imx_pcm_dma_init); diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h index 67f656c7c320..20b46f285d45 100644 --- a/sound/soc/fsl/imx-pcm.h +++ b/sound/soc/fsl/imx-pcm.h @@ -33,10 +33,11 @@ imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data, } #ifdef CONFIG_SND_SOC_IMX_PCM_DMA -int imx_pcm_dma_init(struct platform_device *pdev); +int imx_pcm_dma_init(struct platform_device *pdev, unsigned int flags); void imx_pcm_dma_exit(struct platform_device *pdev); #else -static inline int imx_pcm_dma_init(struct platform_device *pdev) +static inline int imx_pcm_dma_init(struct platform_device *pdev, + unsigned int flags) { return -ENODEV; } diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index a8362be3cd18..7b48ac264e8f 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c @@ -594,7 +594,9 @@ static int imx_ssi_probe(struct platform_device *pdev) if (ret) goto failed_pcm_fiq; - ret = imx_pcm_dma_init(pdev); + ret = imx_pcm_dma_init(pdev, SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | + SND_DMAENGINE_PCM_FLAG_NO_DT | + SND_DMAENGINE_PCM_FLAG_COMPAT); if (ret) goto failed_pcm_dma; |