summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pl022.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2023-06-02 13:57:30 +0200
committerMark Brown <broonie@kernel.org>2023-06-02 13:15:14 +0100
commita34e0353a681bbdd0402825e25410c3236109f31 (patch)
treeb71b11e8f75dd73fb6d76e2da32f3396186b8db5 /drivers/spi/spi-pl022.c
parent20c475d21ed9326f7b1396c9bb8991b375cb6c50 (diff)
downloadlinux-a34e0353a681bbdd0402825e25410c3236109f31.tar.gz
linux-a34e0353a681bbdd0402825e25410c3236109f31.tar.bz2
linux-a34e0353a681bbdd0402825e25410c3236109f31.zip
spi: spi-imx: fix mixing of native and gpio chipselects for imx51/imx53/imx6 variants
Commit 87c614175bbf (spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3) ensured that the argument passed to the macros was masked with &3, so that we no longer write outside the intended fields in the various control registers. When all chip selects are gpios, this works just fine. However, when a mix of native and gpio chip selects are in use, that masking is too naive. Say, for example, that SS0 is muxed as native chip select, and there is also a chip at 4 (obviously with a gpio cs). In that case, when accessing the latter chip, both the SS0 pin and the gpio pin will be asserted low. The fix for this is to use the ->unused_native_cs value as channel number for any spi device which uses a gpio as chip select. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Link: https://lore.kernel.org/r/20230602115731.708883-1-linux@rasmusvillemoes.dk Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pl022.c')
0 files changed, 0 insertions, 0 deletions