Skip to contentSkip to conversation

spi: nxp_fspi: Ensure width is respected in spi-mem operations

PATCH In review Michael Walle 2 participants 2 messages Jul 26, 2021 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: nxp_fspi: Ensure width is respected in spi-mem operations

Import linux commit 007773e16a6f ("spi: nxp-fspi: Ensure width is respected in spi-mem operations") to fix SPI access on boards which don't have all SPI I/O lines connected to the flash.

Since commit 71025f013ccb ("mtd: spi-nor-core: Rework hwcaps selection") u-boot figures out the capabilities by looking at spi_mem_supports_op(). The FlexSPI driver doesn't take the board layout into account. Fix that.

Fixes 383fded70c4f ("spi: nxp_fspi: new driver for the FlexSPI controller")
---
 drivers/spi/nxp_fspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/nxp_fspi.c +1 -1
index 6c5bad4c2c..bba7a330e0 100644
@@ -428,7 +428,7 @@ static bool nxp_fspi_supports_op(struct spi_slave *slave,
 	    op->data.nbytes > f->devtype_data->txfifo)
 		return false;
 
-	return true;
+	return spi_mem_default_supports_op(slave, op);
 }
 
 /* Instead of busy looping invoke readl_poll_sleep_timeout functionality. */
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Michael Walle

Import linux commit 007773e16a6f ("spi: nxp-fspi: Ensure width is respected in spi-mem operations") to fix SPI access on boards which don't have all SPI I/O lines connected to the flash.

Since commit 71025f013ccb ("mtd: spi-nor-core: Rework hwcaps selection") u-boot figures out the capabilities by looking at spi_mem_supports_op(). The FlexSPI driver doesn't take the board layout into account. Fix that.

Fixes 383fded70c4f ("spi: nxp_fspi: new driver for the FlexSPI controller")
Signature · 3 lines
Regards,
Pratyush Yadav
Texas Instruments Inc.