Skip to content

Commit 5f66db0

Browse files
StefanMoringbroonie
authored andcommitted
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]> Reported-by: Sebastian Reichel <[email protected]> Fixes: 15a6af9 ("spi: Increase imx51 ecspi burst length based on transfer length") Tested-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 9855d60 commit 5f66db0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
662662
if (spi_imx->count >= 512)
663663
ctrl |= 0xFFF << MX51_ECSPI_CTRL_BL_OFFSET;
664664
else
665-
ctrl |= (spi_imx->count*8 - 1)
665+
ctrl |= (spi_imx->count * spi_imx->bits_per_word - 1)
666666
<< MX51_ECSPI_CTRL_BL_OFFSET;
667667
}
668668

0 commit comments

Comments
 (0)