diff mbox

mmc: set timeout for SDHCI host before sending busy cmds

Message ID 20110309080609.GA23207@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chuanxiao.Dong March 9, 2011, 8:06 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 99c372e..8306323 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -659,8 +659,15 @@  static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
 
 	WARN_ON(host->data);
 
-	if (data == NULL)
+	if (data == NULL) {
+		/*
+		 * set the timeout to be maximum value for commands those with
+		 * busy signal
+		 */
+		if (host->cmd->flags & MMC_RSP_BUSY)
+			sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
 		return;
+	}
 
 	/* Sanity checks */
 	BUG_ON(data->blksz * data->blocks > 524288);