aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-05-09 11:09:15 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-07-12 23:43:07 -0400
commit916001fe33b7b4dc797f7b29ec8bc346c4369fa6 (patch)
treee62f4ff5e51704bab0c365ab555afd23b2be076f /drivers
parent5902c9a7a2a9c2520af54af1ba7a9c7831664a17 (diff)
mmc: sh_mmcif: remove unneeded struct sh_mmcif_dma, prepare to shdma conversion
Now that all users have been updated to use the embedded in struct sh_mmcif_plat_data DMA slave IDs, struct sh_mmcif_dma is no longer needed and can be removed. This also makes preparation to the shdma base library conversion easier. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Chris Ball <cjb@laptop.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sh_mmcif.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 724b35e85a26..9e3b9b1c3637 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -385,31 +385,27 @@ static void sh_mmcif_request_dma(struct sh_mmcif_host *host,
385 host->dma_active = false; 385 host->dma_active = false;
386 386
387 /* We can only either use DMA for both Tx and Rx or not use it at all */ 387 /* We can only either use DMA for both Tx and Rx or not use it at all */
388 if (pdata->dma) { 388 tx = &host->dma_slave_tx;
389 dev_warn(&host->pd->dev, 389 tx->shdma_slave.slave_id = pdata->slave_id_tx;
390 "Update your platform to use embedded DMA slave IDs\n"); 390 rx = &host->dma_slave_rx;
391 tx = &pdata->dma->chan_priv_tx; 391 rx->shdma_slave.slave_id = pdata->slave_id_rx;
392 rx = &pdata->dma->chan_priv_rx; 392
393 } else { 393 if (tx->shdma_slave.slave_id > 0 && rx->shdma_slave.slave_id > 0) {
394 tx = &host->dma_slave_tx;
395 tx->slave_id = pdata->slave_id_tx;
396 rx = &host->dma_slave_rx;
397 rx->slave_id = pdata->slave_id_rx;
398 }
399 if (tx->slave_id > 0 && rx->slave_id > 0) {
400 dma_cap_mask_t mask; 394 dma_cap_mask_t mask;
401 395
402 dma_cap_zero(mask); 396 dma_cap_zero(mask);
403 dma_cap_set(DMA_SLAVE, mask); 397 dma_cap_set(DMA_SLAVE, mask);
404 398
405 host->chan_tx = dma_request_channel(mask, sh_mmcif_filter, tx); 399 host->chan_tx = dma_request_channel(mask, sh_mmcif_filter,
400 &tx->shdma_slave);
406 dev_dbg(&host->pd->dev, "%s: TX: got channel %p\n", __func__, 401 dev_dbg(&host->pd->dev, "%s: TX: got channel %p\n", __func__,
407 host->chan_tx); 402 host->chan_tx);
408 403
409 if (!host->chan_tx) 404 if (!host->chan_tx)
410 return; 405 return;
411 406
412 host->chan_rx = dma_request_channel(mask, sh_mmcif_filter, rx); 407 host->chan_rx = dma_request_channel(mask, sh_mmcif_filter,
408 &rx->shdma_slave);
413 dev_dbg(&host->pd->dev, "%s: RX: got channel %p\n", __func__, 409 dev_dbg(&host->pd->dev, "%s: RX: got channel %p\n", __func__,
414 host->chan_rx); 410 host->chan_rx);
415 411