Commit d83d89ea authored by Patrice Chotard's avatar Patrice Chotard Committed by Mark Brown

spi: stm32-qspi: Fix wait_cmd timeout in APM mode

In APM mode, TCF and TEF flags are not set. To avoid timeout in
stm32_qspi_wait_cmd(), don't check if TCF/TEF are set.
Signed-off-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Reported-by: eberhard.stoll@kontron.de
Link: https://lore.kernel.org/r/20220511074644.558874-2-patrice.chotard@foss.st.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f724c296
...@@ -308,7 +308,8 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi, ...@@ -308,7 +308,8 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi,
if (!op->data.nbytes) if (!op->data.nbytes)
goto wait_nobusy; goto wait_nobusy;
if (readl_relaxed(qspi->io_base + QSPI_SR) & SR_TCF) if ((readl_relaxed(qspi->io_base + QSPI_SR) & SR_TCF) ||
qspi->fmode == CCR_FMODE_APM)
goto out; goto out;
reinit_completion(&qspi->data_completion); reinit_completion(&qspi->data_completion);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment