Skip to content

Commit 939edfa

Browse files
agamezbroonie
authored andcommitted
spi: xilinx: increase number of retries before declaring stall
SPI devices using a (relative) slow frequency need a larger time. For instance, microblaze running at 83.25MHz and performing a 3 bytes transaction using a 10MHz/16 = 625kHz needed this stall value increased to at least 20. The SPI device is quite slow, but also is the microblaze, so set this value to 32 to give it even more margin. Signed-off-by: Alvaro Gamez Machado <[email protected]> Reviewed-by: Ricardo Ribalda <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 86d57d9 commit 939edfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-xilinx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
300300

301301
/* Read out all the data from the Rx FIFO */
302302
rx_words = n_words;
303-
stalled = 10;
303+
stalled = 32;
304304
while (rx_words) {
305305
if (rx_words == n_words && !(stalled--) &&
306306
!(sr & XSPI_SR_TX_EMPTY_MASK) &&

0 commit comments

Comments
 (0)