[PATCH 06/12] spi: atmel-quadspi: Reject SDR address with DDR data
Miquel Raynal
miquel.raynal at bootlin.com
Thu Nov 26 11:10:25 PST 2026
The controller enables DDR only when the address, dummy and data phases
are DDR. If the address phase is SDR while the data phase is DDR, the
data phase would be sent in SDR, corrupting the transfer. Reject that
combination in ->supports_op().
Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
drivers/spi/atmel-quadspi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index c53e0488dcb6..4f3ceef67b40 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -487,6 +487,9 @@ static bool atmel_qspi_supports_op(struct spi_mem *mem,
if (!spi_mem_default_supports_op(mem, op))
return false;
+ if (!op->addr.dtr && op->data.dtr)
+ return false;
+
if (aq->caps->octal) {
if (atmel_qspi_sama7g5_find_mode(op) < 0)
return false;
--
2.56.0
More information about the linux-riscv
mailing list