summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/uniphier-sd.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-10-12 23:57:37 +0900
committerUlf Hansson <ulf.hansson@linaro.org>2018-10-15 14:53:21 +0200
commitb7ced87746ebaad2ce2306061293be268575ed44 (patch)
tree35f672cd63010d286701f8732c66061640914564 /drivers/mmc/host/uniphier-sd.c
parentd3dd5db0c1b904e71690ef8cfaebd562d8e865b1 (diff)
mmc: uniphier-sd: fix DMA disabling
Once DMA is enabled, it is not possible to disable it because uniphier_sd_dma_endisable() always sets the DMA_ENABLE_DMASDRW bit regardless of the argument 'enable'. It should disable DMA when 'enable' is false. 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/host/uniphier-sd.c')
-rw-r--r--drivers/mmc/host/uniphier-sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 7a8d3081f579..df854a33c81c 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -78,7 +78,7 @@ static void *uniphier_sd_priv(struct tmio_mmc_host *host)
static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable)
{
- sd_ctrl_write16(host, CTL_DMA_ENABLE, DMA_ENABLE_DMASDRW);
+ sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? DMA_ENABLE_DMASDRW : 0);
}
/* external DMA engine */