Unverified Commit bee08547 authored by Miquel Raynal (Schneider Electric)'s avatar Miquel Raynal (Schneider Electric) Committed by Mark Brown
Browse files

spi: cadence-qspi: Make sure we filter out unsupported ops



The Cadence driver does not support anything else than repeating the
command opcode twice while in octal DTR mode. Make this clear by
checking for this in the ->supports_op() hook.

Reviewed-by: default avatarPratyush Yadav <pratyush@kernel.org>
Tested-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarMiquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Tested-by: default avatarSanthosh Kumar K <s-k6@ti.com>
Link: https://patch.msgid.link/20260122-schneider-6-19-rc1-qspi-v4-7-f9c21419a3e6@bootlin.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 453c5d60
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1531,6 +1531,10 @@ static bool cqspi_supports_mem_op(struct spi_mem *mem,
			return false;
		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;
	} else if (!all_false) {
		/* Mixed DTR modes are not supported. */
		return false;