* [PATCH] spi: xilinx: increase number of retries before declaring stall
@ 2025-11-06 12:14 Álvaro G. M.
2025-11-06 12:24 ` Ricardo Ribalda Delgado
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Álvaro G. M. @ 2025-11-06 12:14 UTC (permalink / raw)
To: linux-spi; +Cc: Ricardo Ribalda Delgado, Michal Simek, Mark Brown
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>
---
drivers/spi/spi-xilinx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) &&
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] spi: xilinx: increase number of retries before declaring stall
2025-11-06 12:14 [PATCH] spi: xilinx: increase number of retries before declaring stall Álvaro G. M.
@ 2025-11-06 12:24 ` Ricardo Ribalda Delgado
2025-11-06 13:15 ` Mark Brown
2025-11-07 15:59 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Ricardo Ribalda Delgado @ 2025-11-06 12:24 UTC (permalink / raw)
To: Álvaro G. M.; +Cc: linux-spi, Michal Simek, Mark Brown
On Thu, Nov 6, 2025 at 1:14 PM Álvaro G. M. <alvaro.gamez@hazent.com> wrote:
>
> 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>
> ---
> drivers/spi/spi-xilinx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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) &&
> --
> 2.49.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] spi: xilinx: increase number of retries before declaring stall
2025-11-06 12:14 [PATCH] spi: xilinx: increase number of retries before declaring stall Álvaro G. M.
2025-11-06 12:24 ` Ricardo Ribalda Delgado
@ 2025-11-06 13:15 ` Mark Brown
2025-11-06 13:46 ` Álvaro G. M.
2025-11-07 15:59 ` Mark Brown
2 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2025-11-06 13:15 UTC (permalink / raw)
To: Álvaro G. M.; +Cc: linux-spi, Ricardo Ribalda Delgado, Michal Simek
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
On Thu, Nov 06, 2025 at 01:14:04PM +0100, Álvaro G. M. wrote:
> 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.
This doesn't apply against current code, please check and resend.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: xilinx: increase number of retries before declaring stall
2025-11-06 13:15 ` Mark Brown
@ 2025-11-06 13:46 ` Álvaro G. M.
0 siblings, 0 replies; 5+ messages in thread
From: Álvaro G. M. @ 2025-11-06 13:46 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, Ricardo Ribalda Delgado, Michal Simek
On Thu, 2025-11-06 at 13:15 +0000, Mark Brown wrote:
> On Thu, Nov 06, 2025 at 01:14:04PM +0100, Álvaro G. M. wrote:
> > 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.
>
> This doesn't apply against current code, please check and resend.
Sorry, I think my email client mangled that. I've tried again with git send-
email
Thanks,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: xilinx: increase number of retries before declaring stall
2025-11-06 12:14 [PATCH] spi: xilinx: increase number of retries before declaring stall Álvaro G. M.
2025-11-06 12:24 ` Ricardo Ribalda Delgado
2025-11-06 13:15 ` Mark Brown
@ 2025-11-07 15:59 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2025-11-07 15:59 UTC (permalink / raw)
To: linux-spi, Álvaro G. M.; +Cc: Ricardo Ribalda Delgado, Michal Simek
On Thu, 06 Nov 2025 13:14:04 +0100, Álvaro G. M. wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: xilinx: increase number of retries before declaring stall
commit: 939edfaa10f1d22e6af6a84bf4bd96dc49c67302
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-07 15:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06 12:14 [PATCH] spi: xilinx: increase number of retries before declaring stall Álvaro G. M.
2025-11-06 12:24 ` Ricardo Ribalda Delgado
2025-11-06 13:15 ` Mark Brown
2025-11-06 13:46 ` Álvaro G. M.
2025-11-07 15:59 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).