aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-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