Skip to content

Commit bee0854

Browse files
miquelraynalbroonie
authored andcommitted
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: Pratyush Yadav <pratyush@kernel.org> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com> Tested-by: Santhosh 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: Mark Brown <broonie@kernel.org>
1 parent 453c5d6 commit bee0854

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/spi/spi-cadence-quadspi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,10 @@ static bool cqspi_supports_mem_op(struct spi_mem *mem,
15311531
return false;
15321532
if (op->data.nbytes && op->data.buswidth != 8)
15331533
return false;
1534+
1535+
/* A single opcode is supported, it will be repeated */
1536+
if ((op->cmd.opcode >> 8) != (op->cmd.opcode & 0xFF))
1537+
return false;
15341538
} else if (!all_false) {
15351539
/* Mixed DTR modes are not supported. */
15361540
return false;

0 commit comments

Comments
 (0)