mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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>
This commit is contained in:
@@ -304,6 +304,12 @@ static int dw_spi_dma_wait_tx_done(struct dw_spi *dws,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (!xfer->rx_buf) {
|
||||
delay.value = dws->n_bytes * BITS_PER_BYTE;
|
||||
while (dw_readl(dws, DW_SPI_SR) & DW_SPI_SR_BUSY)
|
||||
spi_delay_exec(&delay, xfer);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user