Message ID | 1539356258-12374-2-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | New |
Headers | show |
Series | mmc: uniphier-sd: two bug-fixes | expand |
On Fri, Oct 12, 2018 at 11:57:37PM +0900, Masahiro Yamada wrote: > 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>
On 12 October 2018 at 16:57, Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > 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> Applied for next, thanks! Kind regards Uffe > --- > > 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 10e7b30..10d49aa 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.7.4 >
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 10e7b30..10d49aa 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 */
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> --- drivers/mmc/host/uniphier-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4