Message ID | 20210914212105.76186-1-olek2@wp.pl |
---|---|
State | New |
Headers | show |
Series | [net-next,1/8] MIPS: lantiq: dma: add small delay after reset | expand |
On 9/14/21 11:21 PM, Aleksander Jan Bajkowski wrote: > Make the burst length configurable by the drivers. > > Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> For all 4 "MIPS: lantiq: dma:" changes. > --- > .../include/asm/mach-lantiq/xway/xway_dma.h | 2 +- > arch/mips/lantiq/xway/dma.c | 38 ++++++++++++++++--- > 2 files changed, 34 insertions(+), 6 deletions(-) > The DMA changes are looking good. There is also a DMA API driver for this IP core now: https://elixir.bootlin.com/linux/v5.15-rc1/source/drivers/dma/lgm/lgm-dma.c I do not know if it works fully with these older MIPS SoCs. Changing the drivers to use the standard DMA API is a bigger change, which could be done later. Hauke
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 14 Sep 2021 23:20:58 +0200 you wrote: > 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> > --- > arch/mips/lantiq/xway/dma.c | 3 +++ > 1 file changed, 3 insertions(+) Here is the summary with links: - [net-next,1/8] MIPS: lantiq: dma: add small delay after reset https://git.kernel.org/netdev/net-next/c/c12aa581f6d5 - [net-next,2/8] MIPS: lantiq: dma: reset correct number of channel https://git.kernel.org/netdev/net-next/c/5ca9ce2ba4d5 - [net-next,3/8] MIPS: lantiq: dma: fix burst length for DEU https://git.kernel.org/netdev/net-next/c/5ad74d39c51d - [net-next,4/8] MIPS: lantiq: dma: make the burst length configurable by the drivers https://git.kernel.org/netdev/net-next/c/49293bbc50cb - [net-next,5/8] net: lantiq: configure the burst length in ethernet drivers https://git.kernel.org/netdev/net-next/c/14d4e308e0aa - [net-next,6/8] dt-bindings: net: lantiq-xrx200-net: convert to the json-schema https://git.kernel.org/netdev/net-next/c/5535bcfa725a - [net-next,7/8] dt-bindings: net: lantiq,etop-xway: Document Lantiq Xway ETOP bindings https://git.kernel.org/netdev/net-next/c/dac0bad93741 - [net-next,8/8] dt-bindings: net: lantiq: Add the burst length properties https://git.kernel.org/netdev/net-next/c/c68872146489 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c index 63dccb2ed08b..2784715933d1 100644 --- a/arch/mips/lantiq/xway/dma.c +++ b/arch/mips/lantiq/xway/dma.c @@ -11,6 +11,7 @@ #include <linux/export.h> #include <linux/spinlock.h> #include <linux/clk.h> +#include <linux/delay.h> #include <linux/err.h> #include <linux/of.h> @@ -222,6 +223,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);
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> --- arch/mips/lantiq/xway/dma.c | 3 +++ 1 file changed, 3 insertions(+)