Stefan,

I am asking you about this code, because of this:
  commit 29905a4 - mmc: sdhci: Use timer based timeout detection in
sdhci_send_command()

Occasionally, I am seeing failures when writing to flash on my device:

  Flashing sparse image at offset 2078720
  Flashing Sparse Image
  sdhci_send_command: Timeout for status update!
  mmc fail to send stop cmd
  write_sparse_image: Write failed, block #2181088 [0]

I can eliminate this error if I kludge the following code:

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 5c71ab8..854f7ce 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -243,9 +243,9 @@ static int sdhci_send_command(struct mmc *mmc,
struct mmc_cmd *cmd,
                if (stat & SDHCI_INT_ERROR)
                        break;
        } while (((stat & mask) != mask) &&
-                (get_timer(start) < CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT));
+                (get_timer(start) < 600 /*CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT*/));

-       if (get_timer(start) >= CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT) {
+       if (get_timer(start) >= 600 /*CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT*/) {
                if (host->quirks & SDHCI_QUIRK_BROKEN_R1B)
                        return 0;
                else {

I don't know much about this - I arrived at 600 by trial and error
(500 fails...)
Any ideas?

Thanks, Steve
steve....@raedomain.com  (previously: s...@broadcom.com)
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to