lantiq: switch to kernel 5.10
[openwrt/openwrt.git] / target / linux / lantiq / patches-5.4 / 0110-MIPS-lantiq-dma-add-small-delay-after-reset.patch
1 From 497acc03cd3918baabe25d46e30c5c62b998e24d Mon Sep 17 00:00:00 2001
2 From: Aleksander Jan Bajkowski <olek2@wp.pl>
3 Date: Sat, 19 Jun 2021 13:38:12 +0200
4 Subject: [PATCH 1/5] MIPS: lantiq: dma: add small delay after reset
5
6 Reading the DMA registers immediately after the reset causes
7 Data Bus Error. Adding a small delay fixes this problem.
8
9 Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
10 ---
11 arch/mips/lantiq/xway/dma.c | 3 +++
12 1 file changed, 3 insertions(+)
13
14 --- a/arch/mips/lantiq/xway/dma.c
15 +++ b/arch/mips/lantiq/xway/dma.c
16 @@ -11,6 +11,7 @@
17 #include <linux/export.h>
18 #include <linux/spinlock.h>
19 #include <linux/clk.h>
20 +#include <linux/delay.h>
21 #include <linux/err.h>
22
23 #include <lantiq_soc.h>
24 @@ -221,6 +222,8 @@ ltq_dma_init(struct platform_device *pde
25 clk_enable(clk);
26 ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
27
28 + usleep_range(1, 10);
29 +
30 /* disable all interrupts */
31 ltq_dma_w32(0, LTQ_DMA_IRNEN);
32