[PATCH 08/12] spi: hisi-sfc-v3xx: Validate the dummy buswidth

Miquel Raynal miquel.raynal at bootlin.com
Thu Nov 26 11:10:27 PST 2026


The driver selects its bus mode from the command, address and data
widths; the dummy phase is clocked with the address buswidth. Reject
operations asking for a different dummy buswidth.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
 drivers/spi/spi-hisi-sfc-v3xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-hisi-sfc-v3xx.c b/drivers/spi/spi-hisi-sfc-v3xx.c
index 0790c7179868..5bf0f4f68e4c 100644
--- a/drivers/spi/spi-hisi-sfc-v3xx.c
+++ b/drivers/spi/spi-hisi-sfc-v3xx.c
@@ -182,6 +182,9 @@ static bool hisi_sfc_v3xx_supports_op(struct spi_mem *mem,
 	if (op->addr.nbytes != host->address_mode && op->addr.nbytes)
 		return false;
 
+	if (op->dummy.nbytes && op->dummy.buswidth != op->addr.buswidth)
+		return false;
+
 	return spi_mem_default_supports_op(mem, op);
 }
 

-- 
2.56.0




More information about the linux-riscv mailing list