[PATCH 1/5] spi: cadence-qspi: Revert the filtering of certain opcodes in ODTR

From: Miquel Raynal

Date: Fri Apr 10 2026 - 13:42:42 EST


I got mislead while analyzing the driver by the fact that the second
opcode byte was in all cases smashed:

if (op->cmd.dtr)
opcode = op->cmd.opcode >> 8;
else
opcode = op->cmd.opcode;

While at a first glance this doesn't let a chance to the second byte to
be shifted out on the bus, this is actually the second step of an
initialization, where the byte being apparently "ignored" in DTR mode
has already been written in a dedicated "extended opcode" register. As
such, the comment and the extra check that I proposed were entirely
wrong, remove them.

Fixes: bee085476d27 ("spi: cadence-qspi: Make sure we filter out unsupported ops")
Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
My apologies for this mistake. Until now I never had to deal with "non
repeated" opcodes. Now that I do, I realize that this was wrong.
---
drivers/spi/spi-cadence-quadspi.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 649ff55333f0..87e49d913591 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1538,10 +1538,6 @@ static bool cqspi_supports_mem_op(struct spi_mem *mem,
if (op->data.nbytes && op->data.buswidth != 8)
return false;

- /* A single opcode is supported, it will be repeated */
- if ((op->cmd.opcode >> 8) != (op->cmd.opcode & 0xFF))
- return false;
-
if (cqspi->is_rzn1)
return false;
} else if (!all_false) {

--
2.53.0