U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci: Start status timeout after command issue
@ 2026-05-09 17:59 Tanmay Kathpalia
  2026-05-13  9:57 ` Peng Fan
  0 siblings, 1 reply; 2+ messages in thread
From: Tanmay Kathpalia @ 2026-05-09 17:59 UTC (permalink / raw)
  To: u-boot; +Cc: Peng Fan, Jaehoon Chung, Tom Rini, Tanmay Kathpalia

The status polling timeout in sdhci_send_command() should measure the
time spent waiting for the command interrupt after the command has been
issued.

Do not initialize the timer at function entry, since the command inhibit
wait and setup path can consume time before SDHCI_COMMAND is written.
Start the timer immediately after issuing the command instead.

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@gmail.com>
---
 drivers/mmc/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 648dfa4b5ef..08594e10266 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -215,7 +215,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
 	u32 mask, flags, mode = 0;
 	unsigned int time = 0;
 	int mmc_dev = mmc_get_blk_desc(mmc)->devnum;
-	ulong start = get_timer(0);
+	ulong start;
 
 	host->start_addr = 0;
 	/* Timeout unit - ms */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-13  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 17:59 [PATCH] mmc: sdhci: Start status timeout after command issue Tanmay Kathpalia
2026-05-13  9:57 ` Peng Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox