Patchwork [U-Boot] mmc: omap: improve stat wait message

login
register
mail settings
Submitter Grazvydas Ignotas
Date March 19, 2012, 10:11 p.m.
Message ID <1332195103-24646-1-git-send-email-notasas@gmail.com>
Download mbox | patch
Permalink /patch/147658/
State Accepted
Commit 15ceb1de81e282426d8988264469508fb5dbd192
Delegated to: Andy Fleming
Headers show

Comments

Grazvydas Ignotas - March 19, 2012, 10:11 p.m.
The message didn't state that it's waiting for STAT to _clear_,
and printing the STAT value itself can help to identify problems.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
 drivers/mmc/omap_hsmmc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Tom Rini - March 19, 2012, 11:45 p.m.
On Tue, Mar 20, 2012 at 12:11:43AM +0200, Grazvydas Ignotas wrote:
> The message didn't state that it's waiting for STAT to _clear_,
> and printing the STAT value itself can help to identify problems.
> 
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>

Acked-by: Tom Rini <trini@ti.com>

Andy, please take this via your tree, thanks!

Patch

diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 547acd5..4b81d0d 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -215,7 +215,8 @@  static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
 	start = get_timer(0);
 	while (readl(&mmc_base->stat)) {
 		if (get_timer(0) - start > MAX_RETRY_MS) {
-			printf("%s: timedout waiting for stat!\n", __func__);
+			printf("%s: timedout waiting for STAT (%x) to clear\n",
+				__func__, readl(&mmc_base->stat));
 			return TIMEOUT;
 		}
 	}