]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
MIPS: lantiq: dma: add small delay after reset
authorAleksander Jan Bajkowski <olek2@wp.pl>
Tue, 14 Sep 2021 21:20:58 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:04 +0000 (11:36 +0100)
[ Upstream commit c12aa581f6d5e80c3c3675ab26a52c2b3b62f76e ]

Reading the DMA registers immediately after the reset causes
Data Bus Error. Adding a small delay fixes this issue.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/lantiq/xway/dma.c

index 664f2f7f55c1c06f34e58a551fa917a27f1f9dff..45a622b72cd13f60d7e6db00da98e27027880e33 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/export.h>
 #include <linux/spinlock.h>
 #include <linux/clk.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #include <lantiq_soc.h>
@@ -233,6 +234,8 @@ ltq_dma_init(struct platform_device *pdev)
        clk_enable(clk);
        ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
 
+       usleep_range(1, 10);
+
        /* disable all interrupts */
        ltq_dma_w32(0, LTQ_DMA_IRNEN);