aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-10-12 23:57:38 +0900
committerUlf Hansson <ulf.hansson@linaro.org>2018-10-15 14:53:21 +0200
commit90f835414067b104d9249e279413dfa65abb99b6 (patch)
tree29039f42807c6087af2db34ede2b88291c8e4bff /drivers/mmc
parentmmc: uniphier-sd: fix DMA disabling (diff)
downloadlinux-dev-90f835414067b104d9249e279413dfa65abb99b6.tar.xz
linux-dev-90f835414067b104d9249e279413dfa65abb99b6.zip
mmc: uniphier-sd: avoid using broken DMA RX channel
host->chan_rx is NULL when UNIPHIER_SD_CAP_BROKEN_DMA_RX quirk flag is set. In this case, it should not set up DMA. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/uniphier-sd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index df854a33c81c..91a2be41edf6 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -252,6 +252,9 @@ static void uniphier_sd_internal_dma_start(struct tmio_mmc_host *host,
u32 dma_mode;
int sg_len;
+ if ((data->flags & MMC_DATA_READ) && !host->chan_rx)
+ goto force_pio;
+
if (WARN_ON(host->sg_len != 1))
goto force_pio;