]> git.baikalelectronics.ru Git - kernel.git/commit
spi: stm32-qspi: Always check SR_TCF flags in stm32_qspi_wait_cmd()
authorPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 11 May 2022 07:46:43 +0000 (09:46 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 11 May 2022 16:40:09 +0000 (17:40 +0100)
commit3c27f0144b7875409438ed9ef38f0c32eaefe608
treefa1e6e086dde0d965942a4b6988d09548ecab779
parent2790fccda501a51140599609048e51be5d88d3ee
spi: stm32-qspi: Always check SR_TCF flags in stm32_qspi_wait_cmd()

Currently, SR_TCF flag is checked in case there is data, this criteria
is not correct.

SR_TCF flags is set when programmed number of bytes has been transferred
to the memory device ("bytes" comprised command and data send to the
SPI device).
So even if there is no data, we must check SR_TCF flag.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20220511074644.558874-3-patrice.chotard@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32-qspi.c