Skip to content

Commit b620aa3

Browse files
bijudasbroonie
authored andcommitted
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 <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e1502ba commit b620aa3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/spi/spi-rspi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,10 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
613613
rspi->dma_callbacked, HZ);
614614
if (ret > 0 && rspi->dma_callbacked) {
615615
ret = 0;
616+
if (tx)
617+
dmaengine_synchronize(rspi->ctlr->dma_tx);
618+
if (rx)
619+
dmaengine_synchronize(rspi->ctlr->dma_rx);
616620
} else {
617621
if (!ret) {
618622
dev_err(&rspi->ctlr->dev, "DMA timeout\n");

0 commit comments

Comments
 (0)