From b7ced87746ebaad2ce2306061293be268575ed44 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 12 Oct 2018 23:57:37 +0900 Subject: [PATCH] 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 Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson --- drivers/mmc/host/uniphier-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.11.0