Skip to contentSkip to conversation

spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller

PATCH In review Tudor Ambarus 2 participants 2 messages Apr 8, 2022 – Apr 27, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller

Use the spi_mem_default_supports_op() core helper in order to take into account the buswidth specified by the user in device tree.

Fixes 24c8ff4684 ("spi: Add Atmel QuadSPI driver")

---
v2: Fix commit's subject

 drivers/spi/atmel-quadspi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/spi/atmel-quadspi.c +3 -0
index 098298336d..cb64119f97 100644
@@ -438,6 +438,9 @@ static bool atmel_qspi_supports_op(struct spi_slave *slave,
 {
 	struct atmel_qspi *aq = dev_get_priv(slave->dev->parent);
 
+	if (!spi_mem_default_supports_op(slave, op))
+		return false;
+
 	if (aq->caps->octal) {
 		if (atmel_qspi_sama7g5_find_mode(op) < 0)
 			return false;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Tudor Ambarus

Use the spi_mem_default_supports_op() core helper in order to take into account the buswidth specified by the user in device tree.

Fixes 24c8ff4684 ("spi: Add Atmel QuadSPI driver")

---
v2: Fix commit's subject

Applied to u-boot-at91/master, thanks !