Skip to contentSkip to conversation

take in account bits per word instead of assuming 8-bits

PATCH In review Stefan Moring 4 participants 4 messages Sep 17, 2023 – Sep 18, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/spi/spi-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-imx.c +1 -1
index a8a74c7cb79f..498e35c8db2c 100644
@@ -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
Tested-by on v1 1/1
#1 lore raw

Re: [PATCH 1/1] spi: imx: take in account bits per word instead of assuming 8-bits

Hi,

Quoted 5 lines · Stefan Moring

The IMX spi driver has a hardcoded 8, breaking the driver for word lengths other than 8.

---

patch subject is missing the 'spi: imx:' prefix. Otherwise:

Fixes 15a6af94a277 ("spi: Increase imx51 ecspi burst length based on transfer length")

(no need to Cc stable, since the regression is only in v6.6-rc1)

-- Sebastian

Quoted 19 lines
 drivers/spi/spi-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-imx.c +1 -1
index a8a74c7cb79f..498e35c8db2c 100644
@@ -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 · 1 line
2.42.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

reviewer Reviewed-by
#2 lore raw

Re: [PATCH 1/1] spi: imx: take in account bits per word instead of assuming 8-bits

Hi Stefan,

There is a typo in the spi mailing list. It should be [email protected].

Quoted 7 lines · Sebastian Reichel

Hi,

Quoted 3 lines · Stefan Moring

The IMX spi driver has a hardcoded 8, breaking the driver for word lengths other than 8.

Quoted 8 lines
Quoted 2 lines

---

patch subject is missing the 'spi: imx:' prefix. Otherwise:

Fixes 15a6af94a277 ("spi: Increase imx51 ecspi burst length based on transfer length")

With the above tags added and the Subject line fixed:

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#3 lore raw
In reply to Stefan Moring
Quoted 4 lines · Stefan Moring

The IMX spi driver has a hardcoded 8, breaking the driver for word lengths other than 8.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] take in account bits per word instead of assuming 8-bits

      commit: 5f66db08cbd3ca471c66bacb0282902c79db9274

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark