spi: cadence-qspi: add early busywait to cqspi_wait_for_bit()
authorThéo Lebrun <theo.lebrun@bootlin.com>
Tue, 23 Apr 2024 10:01:42 +0000 (12:01 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 26 Apr 2024 02:09:24 +0000 (11:09 +0900)
commitc1887396373b8faecef61d352bd521ac66162706
tree8a533995239bf7bedbcf8722857ca0fec27a445a
parent1f257b92e6330d576cc826fb8f0b74fe0e8209de
spi: cadence-qspi: add early busywait to cqspi_wait_for_bit()

Call readl_relaxed_poll_timeout() with no sleep at the start of
cqspi_wait_for_bit(). If its short timeout expires, a sleeping
readl_relaxed_poll_timeout() call takes the relay.

The reason is to avoid hrtimer interrupts on the system. All read
operations are expected to take less than 100µs.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://lore.kernel.org/r/20240423-cdns-qspi-mbly-v4-3-3d2a7b535ad0@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c