spi: stm32_qspi: Always check SR_TCF flags in stm32_qspi_wait_cmd()
authorPatrice Chotard <patrice.chotard@foss.st.com>
Thu, 12 May 2022 07:17:37 +0000 (09:17 +0200)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 19 May 2022 16:54:18 +0000 (18:54 +0200)
commita6d7eeb66db720e77aba587fce6cc88a2003e8ab
treeb8d4dee2c852ffd26618b50aab6d5f48d593307a
parent0adf10a87b1500c4d0970085ab102330721eb449
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 have 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>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/spi/stm32_qspi.c