From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/4] mci: bcm2835: allow core to request timeouts longer than 100ms
Date: Wed, 2 Jul 2025 13:01:37 +0200 [thread overview]
Message-ID: <20250702110139.2235318-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250702110139.2235318-1-a.fatoum@pengutronix.de>
For longer erase operations in future, the core may want to increase
the busy_timeout value beyond 100ms. Drivers should respect that and
only enforce a minimum timeout duration, but not a maximum one.
This is not a full solution, because some drivers/hardwares indeed have
a maximum duration they can wait, but that should probably be solved via
a max_busy_timeout attribute for MMC hosts like Linux does.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/mci/mci-bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index 0099e4e35753..aad5ae0d9e1d 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -129,7 +129,7 @@ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd,
}
/* BCM2xxx SDHCI might take up to 100ms to complete a command */
- cmd->busy_timeout = 100;
+ cmd->busy_timeout = max(cmd->busy_timeout, 100U);
ret = sdhci_wait_idle_data(&host->sdhci, cmd);
if (ret)
--
2.39.5
next prev parent reply other threads:[~2025-07-02 12:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 11:01 [PATCH 0/4] mci: clean up MCI idle delay handling a bit Ahmad Fatoum
2025-07-02 11:01 ` [PATCH 1/4] include: linux/iopoll.h: evaluate timeout_us argument only once Ahmad Fatoum
2025-07-02 11:01 ` Ahmad Fatoum [this message]
2025-07-02 11:01 ` [PATCH 3/4] mci: sdhci: use sdhci_compute_timeout in sdhci_wait_idle[_data] Ahmad Fatoum
2025-07-02 11:01 ` [PATCH 4/4] mci: sdhci: reduce duplication " Ahmad Fatoum
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=20250702110139.2235318-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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