summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorAlvaro Gamez Machado <alvaro.gamez@hazent.com>2025-11-06 14:45:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-12 18:37:19 +0100
commita215b8db00b5133fa77c569e3779ab0987d21c9d (patch)
treedbaf30f1b966f0cdb35dfadf56fd3a4500693280 /drivers/spi
parentdeff7dfc4dc4e5b515f9b51a182094fba3b6945f (diff)
downloadlinux-a215b8db00b5133fa77c569e3779ab0987d21c9d.tar.gz
linux-a215b8db00b5133fa77c569e3779ab0987d21c9d.tar.bz2
linux-a215b8db00b5133fa77c569e3779ab0987d21c9d.zip
spi: xilinx: increase number of retries before declaring stall
[ Upstream commit 939edfaa10f1d22e6af6a84bf4bd96dc49c67302 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/spi')
-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 7795328427a6..f5e41813b958 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -299,7 +299,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) &&