aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc_dma.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-04-26 11:47:17 -0400
committerChris Ball <cjb@laptop.org>2013-05-26 14:23:19 -0400
commit03a0675b2a112038a8a5078d8815e3f7356c7064 (patch)
treeedf494afa3c628bf9a91242c0e9cba1717d82891 /drivers/mmc/host/tmio_mmc_dma.c
parentfc79a4d6dfa736672281aedbe384ece1f0044756 (diff)
mmc: sdhi/tmio: make DMA filter implementation specific
So far only the SDHI implementation uses TMIO MMC with DMA. That way a DMA channel filter function, defined in the TMIO driver wasn't a problem. However, such a filter function is DMA controller specific. Since the SDHI glue is only running on systems with the SHDMA DMA controller, the filter function can safely be provided by it. Move it into SDHI. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_dma.c')
-rw-r--r--drivers/mmc/host/tmio_mmc_dma.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
index fff928604859..dc4b10b9c72a 100644
--- a/drivers/mmc/host/tmio_mmc_dma.c
+++ b/drivers/mmc/host/tmio_mmc_dma.c
@@ -261,14 +261,6 @@ out:
261 spin_unlock_irq(&host->lock); 261 spin_unlock_irq(&host->lock);
262} 262}
263 263
264/* It might be necessary to make filter MFD specific */
265static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
266{
267 dev_dbg(chan->device->dev, "%s: slave data %p\n", __func__, arg);
268 chan->private = arg;
269 return true;
270}
271
272void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata) 264void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
273{ 265{
274 /* We can only either use DMA for both Tx and Rx or not use it at all */ 266 /* We can only either use DMA for both Tx and Rx or not use it at all */
@@ -281,7 +273,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
281 dma_cap_zero(mask); 273 dma_cap_zero(mask);
282 dma_cap_set(DMA_SLAVE, mask); 274 dma_cap_set(DMA_SLAVE, mask);
283 275
284 host->chan_tx = dma_request_channel(mask, tmio_mmc_filter, 276 host->chan_tx = dma_request_channel(mask, pdata->dma->filter,
285 pdata->dma->chan_priv_tx); 277 pdata->dma->chan_priv_tx);
286 dev_dbg(&host->pdev->dev, "%s: TX: got channel %p\n", __func__, 278 dev_dbg(&host->pdev->dev, "%s: TX: got channel %p\n", __func__,
287 host->chan_tx); 279 host->chan_tx);
@@ -289,7 +281,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
289 if (!host->chan_tx) 281 if (!host->chan_tx)
290 return; 282 return;
291 283
292 host->chan_rx = dma_request_channel(mask, tmio_mmc_filter, 284 host->chan_rx = dma_request_channel(mask, pdata->dma->filter,
293 pdata->dma->chan_priv_rx); 285 pdata->dma->chan_priv_rx);
294 dev_dbg(&host->pdev->dev, "%s: RX: got channel %p\n", __func__, 286 dev_dbg(&host->pdev->dev, "%s: RX: got channel %p\n", __func__,
295 host->chan_rx); 287 host->chan_rx);