spi: imx: take in account bits per word instead of assuming 8-bits
Subsystems (2)
PATCH 1/1 spi: imx: take in account bits per word instead of assuming 8-bits
The IMX spi driver has a hardcoded 8, breaking the driver for word lengths other than 8.
Signed-off-by Stefan Moring <[email protected]>
--- drivers/spi/spi-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-imx.c +1 -1
@@ -662,7 +662,7 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,if (spi_imx->count >=512 ) ctrl |=0xFFF <<MX51_ECSPI_CTRL_BL_OFFSET ;else - ctrl |= (spi_imx->count*8 -1 ) + ctrl |= (spi_imx->count * spi_imx->bits_per_word -1 ) <<MX51_ECSPI_CTRL_BL_OFFSET ; }
Signature · 7 lines
2.42.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel