From: <patrice.chotard@foss.st.com> To: Mark Brown <broonie@kernel.org>, Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: <linux-spi@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <christophe.kerello@foss.st.com>, <patrice.chotard@foss.st.com>, <eberhard.stoll@kontron.de> Subject: [PATCH 1/3] spi: stm32-qspi: Fix wait_cmd timeout in APM mode Date: Wed, 11 May 2022 09:46:42 +0200 [thread overview] Message-ID: <20220511074644.558874-2-patrice.chotard@foss.st.com> (raw) In-Reply-To: <20220511074644.558874-1-patrice.chotard@foss.st.com> From: Patrice Chotard <patrice.chotard@foss.st.com> 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: Patrice Chotard <patrice.chotard@foss.st.com> Reported-by: eberhard.stoll@kontron.de --- drivers/spi/spi-stm32-qspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index bf47a1452001..12d8bec35bf6 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -308,7 +308,8 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi, if (!op->data.nbytes) 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; reinit_completion(&qspi->data_completion); -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: <patrice.chotard@foss.st.com> To: Mark Brown <broonie@kernel.org>, Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: <linux-spi@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <christophe.kerello@foss.st.com>, <patrice.chotard@foss.st.com>, <eberhard.stoll@kontron.de> Subject: [PATCH 1/3] spi: stm32-qspi: Fix wait_cmd timeout in APM mode Date: Wed, 11 May 2022 09:46:42 +0200 [thread overview] Message-ID: <20220511074644.558874-2-patrice.chotard@foss.st.com> (raw) In-Reply-To: <20220511074644.558874-1-patrice.chotard@foss.st.com> From: Patrice Chotard <patrice.chotard@foss.st.com> 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: Patrice Chotard <patrice.chotard@foss.st.com> Reported-by: eberhard.stoll@kontron.de --- drivers/spi/spi-stm32-qspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index bf47a1452001..12d8bec35bf6 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -308,7 +308,8 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi, if (!op->data.nbytes) 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; reinit_completion(&qspi->data_completion); -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-05-11 7:47 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-11 7:46 [PATCH 0/3] spi: stm32-qspi: flags management fixes patrice.chotard 2022-05-11 7:46 ` patrice.chotard 2022-05-11 7:46 ` patrice.chotard [this message] 2022-05-11 7:46 ` [PATCH 1/3] spi: stm32-qspi: Fix wait_cmd timeout in APM mode patrice.chotard 2022-05-11 7:46 ` [PATCH 2/3] spi: stm32-qspi: Always check SR_TCF flags in stm32_qspi_wait_cmd() patrice.chotard 2022-05-11 7:46 ` patrice.chotard 2022-05-11 7:46 ` [PATCH 3/3] spi: stm32-qspi: Remove SR_BUSY bit check before sending command patrice.chotard 2022-05-11 7:46 ` patrice.chotard 2022-05-11 18:49 ` [PATCH 0/3] spi: stm32-qspi: flags management fixes Mark Brown 2022-05-11 18:49 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220511074644.558874-2-patrice.chotard@foss.st.com \ --to=patrice.chotard@foss.st.com \ --cc=alexandre.torgue@foss.st.com \ --cc=broonie@kernel.org \ --cc=christophe.kerello@foss.st.com \ --cc=eberhard.stoll@kontron.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.