[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251219-schneider-6-19-rc1-qspi-v1-6-8ad505173e44@bootlin.com>
Date: Fri, 19 Dec 2025 20:22:08 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>, Vaishnav Achath <vaishnav.a@...com>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Hervé Codina <herve.codina@...tlin.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Vignesh Raghavendra <vigneshr@...com>, Santhosh Kumar K <s-k6@...com>,
Pratyush Yadav <pratyush@...nel.org>,
Pascal Eberhard <pascal.eberhard@...com>, linux-spi@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
"Miquel Raynal (Schneider Electric)" <miquel.raynal@...tlin.com>
Subject: [PATCH 06/13] 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.
Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
---
drivers/spi/spi-cadence-quadspi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 8f78d1c44663..f59f3a8dccf5 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1537,6 +1537,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;
--
2.51.1
Powered by blists - more mailing lists