spi: fsl_spi: Don't change speed while chipselect is active
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 14 Dec 2022 13:41:33 +0000 (14:41 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 14 Dec 2022 14:24:51 +0000 (14:24 +0000)
commit3b553e0041a65e499fa4e25ee146f01f4ec4e617
treef88dfc4c112cb92cc27269dc4ee38226fdf622fd
parent3cf241c3d56ff19f5192cb42a025bc6582b6e8fa
spi: fsl_spi: Don't change speed while chipselect is active

Commit c9bfcb315104 ("spi_mpc83xx: much improved driver") made
modifications to the driver to not perform speed changes while
chipselect is active. But those changes where lost with the
convertion to tranfer_one.

Previous implementation was allowing speed changes during
message transfer when cs_change flag was set.
At the time being, core SPI does not provide any feature to change
speed while chipselect is off, so do not allow any speed change during
message transfer, and perform the transfer setup in prepare_message
in order to set correct speed while chipselect is still off.

Reported-by: Herve Codina <herve.codina@bootlin.com>
Fixes: 64ca1a034f00 ("spi: fsl_spi: Convert to transfer_one")
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/8aab84c51aa330cf91f4b43782a1c483e150a4e3.1671025244.git.christophe.leroy@csgroup.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-spi.c