[PATCH 2/4] mci: bcm2835: allow core to request timeouts longer than 100ms
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jul 2 04:01:37 PDT 2025
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 at 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
More information about the barebox
mailing list