Commit 5f66db08 authored by Stefan Moring's avatar Stefan Moring Committed by Mark Brown

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: default avatarStefan Moring <stefanmoring@gmail.com>
Reported-by: default avatarSebastian Reichel <sre@kernel.org>
Fixes: 15a6af94 ("spi: Increase imx51 ecspi burst length based on transfer length")
Tested-by: default avatarSebastian Reichel <sre@kernel.org>
Link: https://lore.kernel.org/r/20230917164037.29284-1-stefanmoring@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9855d60c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment