diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-05-05 13:36:03 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-05-05 13:36:03 +0800 |
commit | e91b1cc90283c1b9b75670b027a18afbd20fe070 (patch) | |
tree | 81c395406a3774775a183d544aee9c5ced1c31d6 /drivers/mmc/host/atmel-mci.c | |
parent | d83731cf53fd3af7173cab5e3f573d06ebc852be (diff) | |
parent | 0b3df30dcadcddc56aed56c3c2d2de2ca963e81d (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-16.06-rtlsk-v4.1-16.05-rt
Diffstat (limited to 'drivers/mmc/host/atmel-mci.c')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 9a39e0b7e583..0c864eb21f58 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2281,6 +2281,23 @@ static int atmci_configure_dma(struct atmel_mci *host) { host->dma.chan = dma_request_slave_channel_reason(&host->pdev->dev, "rxtx"); + + if (PTR_ERR(host->dma.chan) == -ENODEV) { + struct mci_platform_data *pdata = host->pdev->dev.platform_data; + dma_cap_mask_t mask; + + if (!pdata || !pdata->dma_filter) + return -ENODEV; + + dma_cap_zero(mask); + dma_cap_set(DMA_SLAVE, mask); + + host->dma.chan = dma_request_channel(mask, pdata->dma_filter, + pdata->dma_slave); + if (!host->dma.chan) + host->dma.chan = ERR_PTR(-ENODEV); + } + if (IS_ERR(host->dma.chan)) return PTR_ERR(host->dma.chan); |