Skip to content

Commit b72cbb1

Browse files
pcercueivinodkoul
authored andcommitted
dmaengine: jz4780: Work around hardware bug on JZ4760 SoCs
The JZ4760 SoC has a hardware problem with chan0 not enabling properly if it's enabled before chan1, after a reset (works fine afterwards). This is worked around in the probe function by just enabling then disabling chan1. Signed-off-by: Paul Cercueil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent dafa79a commit b72cbb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/dma/dma-jz4780.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,14 @@ static int jz4780_dma_probe(struct platform_device *pdev)
938938
jzchan->vchan.desc_free = jz4780_dma_desc_free;
939939
}
940940

941+
/*
942+
* On JZ4760, chan0 won't enable properly the first time.
943+
* Enabling then disabling chan1 will magically make chan0 work
944+
* correctly.
945+
*/
946+
jz4780_dma_chan_enable(jzdma, 1);
947+
jz4780_dma_chan_disable(jzdma, 1);
948+
941949
ret = platform_get_irq(pdev, 0);
942950
if (ret < 0)
943951
goto err_disable_clk;

0 commit comments

Comments
 (0)