immortalwrt/target/linux/bcm27xx/patches-6.6/950-1534-fixup-spi-dw-Wait-for-idle-after-TX.patch
Álvaro Fernández Rojas 5872633b9d bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.83..HEAD
(HEAD -> 08d4e8f52256bd422d8a1f876411603f627d0a82)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 251f76c1c67d62c585d799c38dab31e1385d2ad5)
2025-03-16 21:08:29 +01:00

26 lines
734 B
Diff

From fab0093d88452972f05f4b13e91e31d00b55421a Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 4 Feb 2025 15:25:30 +0000
Subject: [PATCH] fixup! spi: dw: Wait for idle after TX
Relax a bit harder - transmission of the last bits may take a while.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/spi/spi-dw-dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-dw-dma.c
+++ b/drivers/spi/spi-dw-dma.c
@@ -305,8 +305,9 @@ static int dw_spi_dma_wait_tx_done(struc
}
if (!xfer->rx_buf) {
+ delay.value = dws->n_bytes * BITS_PER_BYTE;
while (dw_readl(dws, DW_SPI_SR) & DW_SPI_SR_BUSY)
- cpu_relax();
+ spi_delay_exec(&delay, xfer);
}
return 0;