I found the current timeout is too short for some devices to execute
erase command.  Nor can we override CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
from a board config.

Increase the default timeout and surround the define with "ifndef"
to allow to override it in case the default value is not a good fit.

Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com>
---

 drivers/mmc/sdhci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index ef7e615..7670d73 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -126,7 +126,9 @@ static int sdhci_transfer_data(struct sdhci_host *host, 
struct mmc_data *data,
 #ifndef CONFIG_SDHCI_CMD_MAX_TIMEOUT
 #define CONFIG_SDHCI_CMD_MAX_TIMEOUT           3200
 #endif
-#define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
+#ifndef CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
+#define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       1000
+#endif
 
 static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
                       struct mmc_data *data)
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to