]> git.baikalelectronics.ru Git - kernel.git/commit
spi: meson-spicc: do not rely on busy flag in pow2 clk ops
authorNeil Armstrong <narmstrong@baylibre.com>
Thu, 8 Sep 2022 12:18:03 +0000 (14:18 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 8 Sep 2022 12:51:51 +0000 (13:51 +0100)
commit721a850a5d3364e0de0b57135cbb6eec14514fdd
tree78599a68685ed3b8a9868e78b9b2b3f7ca2ac422
parent6d46ccc3f9eda8ba25f4b2df7592d0f86eebaee4
spi: meson-spicc: do not rely on busy flag in pow2 clk ops

Since [1], controller's busy flag isn't set anymore when the
__spi_transfer_message_noqueue() is used instead of the
__spi_pump_transfer_message() logic for spi_sync transfers.

Since the pow2 clock ops were limited to only be available when a
transfer is ongoing (between prepare_transfer_hardware and
unprepare_transfer_hardware callbacks), the only way to track this
down is to check for the controller cur_msg.

[1] e4b5bfd33952 ("spi: Don't use the message queue if possible in spi_sync")

Fixes: 0de2e3742077 ("spi: meson-spicc: add local pow2 clock ops to preserve rate between messages")
Fixes: e4b5bfd33952 ("spi: Don't use the message queue if possible in spi_sync")
Reported-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/r/20220908121803.919943-1-narmstrong@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-meson-spicc.c