Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: spi-rspi: Fix PIO fallback on RZ platforms

RSPI IP on RZ/{A, G2L} SoC's has the same signal for both interrupt
and DMA transfer request. Setting DMARS register for DMA transfer
makes the signal to work as a DMA transfer request signal and
subsequent interrupt requests to the interrupt controller
are masked.

PIO fallback does not work as interrupt signal is disabled.

This patch fixes this issue by re-enabling the interrupts by
calling dmaengine_synchronize().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220721143449.879257-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Biju Das and committed by
Mark Brown
b620aa3a e1502ba4

+4
+4
drivers/spi/spi-rspi.c
··· 613 613 rspi->dma_callbacked, HZ); 614 614 if (ret > 0 && rspi->dma_callbacked) { 615 615 ret = 0; 616 + if (tx) 617 + dmaengine_synchronize(rspi->ctlr->dma_tx); 618 + if (rx) 619 + dmaengine_synchronize(rspi->ctlr->dma_rx); 616 620 } else { 617 621 if (!ret) { 618 622 dev_err(&rspi->ctlr->dev, "DMA timeout\n");