Unverified Commit 5e75c1d4 authored by Miquel Raynal's avatar Miquel Raynal Committed by Mark Brown
Browse files

spi: cadence-qspi: Revert the filtering of certain opcodes in ODTR



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: bee08547 ("spi: cadence-qspi: Make sure we filter out unsupported ops")
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20260410-winbond-6-19-rc1-oddr-v1-1-2ac4827a3868@bootlin.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ab00feba
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1544,10 +1544,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) {