]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: uniphier-sd: fix DMA disabling
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 12 Oct 2018 14:57:37 +0000 (23:57 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Oct 2018 12:53:21 +0000 (14:53 +0200)
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>
drivers/mmc/host/uniphier-sd.c

index 7a8d3081f5790499d48c7efb5ac1f82074fb811a..df854a33c81cd585abddae4cef5f48641364c79a 100644 (file)
@@ -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 */