spi: nxp_fspi: Ensure width is respected in spi-mem operations
authorMichael Walle <michael@walle.cc>
Mon, 26 Jul 2021 19:35:28 +0000 (21:35 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Wed, 18 Aug 2021 10:25:15 +0000 (15:55 +0530)
commit364174b2d3bcad1a3ebd30c0eec9307ae5cb477a
treef1679d3c15e92b58eced4a72a86ec893d3cbc5c5
parent78e786decb6c8783568044c98891e64289cbf59c
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")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/spi/nxp_fspi.c