From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Patrice Chotard <patrice.chotard@foss.st.com>,
eberhard.stoll@kontron.de, Mark Brown <broonie@kernel.org>,
Sasha Levin <sashal@kernel.org>,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
linux-spi@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 5.18 099/159] spi: stm32-qspi: Fix wait_cmd timeout in APM mode
Date: Mon, 30 May 2022 09:23:24 -0400 [thread overview]
Message-ID: <20220530132425.1929512-99-sashal@kernel.org> (raw)
In-Reply-To: <20220530132425.1929512-1-sashal@kernel.org>
From: Patrice Chotard <patrice.chotard@foss.st.com>
[ Upstream commit d83d89ea68b4726700fa87b22db075e4217e691c ]
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
Link: https://lore.kernel.org/r/20220511074644.558874-2-patrice.chotard@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 ffdc55f87e82..dd38cb8ffbc2 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.35.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-30 13:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220530132425.1929512-1-sashal@kernel.org>
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 041/159] cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 057/159] drm/sun4i: Add support for D1 TCONs Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 063/159] arm64/sme: Add ID_AA64SMFR0_EL1 to __read_sysreg_by_encoding() Sasha Levin
2022-05-30 14:17 ` Mark Brown
2022-06-05 13:13 ` Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 069/159] arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 084/159] regulator: mt6315: Enforce regulator-compatible, not name Sasha Levin
2022-05-30 13:23 ` Sasha Levin [this message]
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 109/159] mt76: mt7915: accept rx frames with non-standard VHT MCS10-11 Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 110/159] mt76: mt7921: " Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 111/159] mt76: fix encap offload ethernet type check Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 112/159] media: rga: fix possible memory leak in rga_probe Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 123/159] media: mediatek: vcodec: prevent kernel crash when rmmod mtk-vcodec-dec.ko Sasha Levin
2022-05-30 13:24 ` [PATCH AUTOSEL 5.18 135/159] media: exynos4-is: Fix compile warning Sasha Levin
2022-05-30 13:24 ` [PATCH AUTOSEL 5.18 147/159] ARM: 9201/1: spectre-bhb: rely on linker to emit cross-section literal loads Sasha Levin
2022-05-30 13:32 ` Ard Biesheuvel
2022-05-30 15:25 ` Greg KH
2022-05-30 15:56 ` Ard Biesheuvel
2022-05-30 19:37 ` Greg KH
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=20220530132425.1929512-99-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=broonie@kernel.org \
--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 \
--cc=mcoquelin.stm32@gmail.com \
--cc=patrice.chotard@foss.st.com \
--cc=stable@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).