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

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 <alvaro.gamez@hazent.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20251106134545.31942-1-alvaro.gamez@hazent.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Alvaro Gamez Machado and committed by
Mark Brown
939edfaa 86d57d9c

+1 -1
+1 -1
drivers/spi/spi-xilinx.c
··· 300 300 301 301 /* Read out all the data from the Rx FIFO */ 302 302 rx_words = n_words; 303 - stalled = 10; 303 + stalled = 32; 304 304 while (rx_words) { 305 305 if (rx_words == n_words && !(stalled--) && 306 306 !(sr & XSPI_SR_TX_EMPTY_MASK) &&