aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-xilinx.c
diff options
context:
space:
mode:
authorAlvaro Gamez Machado <[email protected]>2025-11-06 13:45:35 +0000
committerMark Brown <[email protected]>2025-11-07 09:37:46 +0000
commit939edfaa10f1d22e6af6a84bf4bd96dc49c67302 (patch)
tree755a3f9097a46c457e65a071c346e45dbec1a3a1 /drivers/spi/spi-xilinx.c
parentspi: imx: keep dma request disabled before dma transfer setup (diff)
downloadkernel-939edfaa10f1d22e6af6a84bf4bd96dc49c67302.tar.gz
kernel-939edfaa10f1d22e6af6a84bf4bd96dc49c67302.zip
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]>
Diffstat (limited to 'drivers/spi/spi-xilinx.c')
-rw-r--r--drivers/spi/spi-xilinx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index d59cc8a18484..c86dc56f38b4 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -300,7 +300,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
/* Read out all the data from the Rx FIFO */
rx_words = n_words;
- stalled = 10;
+ stalled = 32;
while (rx_words) {
if (rx_words == n_words && !(stalled--) &&
!(sr & XSPI_SR_TX_EMPTY_MASK) &&