diff mbox

mmc: sdhci: increase default timeout and make it configurable

Message ID 1461823750-29427-1-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada April 28, 2016, 6:09 a.m. UTC
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.masahiro@socionext.com>

---

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

-- 
1.9.1

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

Patch

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)