Skip to content

Commit 54a442d

Browse files
committed
spi: dw: Wait for idle after TX
If this is a DMA transfer, and if there is no simultaneous RX transfer, wait for the interface to go idle before reporting that TX is done. Link: https://forums.raspberrypi.com/viewtopic.php?t=383027 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent 8a08b4a commit 54a442d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/spi/spi-dw-dma.c

+5
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ static int dw_spi_dma_wait_tx_done(struct dw_spi *dws,
304304
return -EIO;
305305
}
306306

307+
if (!xfer->rx_buf) {
308+
while (dw_readl(dws, DW_SPI_SR) & DW_SPI_SR_BUSY)
309+
cpu_relax();
310+
}
311+
307312
return 0;
308313
}
309314

0 commit comments

Comments
 (0)