aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2015-04-03 14:13:05 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2015-04-09 03:08:21 -0400
commit8886a6fd19775eb43b7834850d0ad3f749b70053 (patch)
tree01034613de00d968848872092b05824d73e3f8f2 /drivers/mmc/host
parent76184ac17edf3c640390b0eddc3aa7be1095fb9f (diff)
mmc: dw_mmc: Increase cmd11 timeout to 500ms
Although the cmd11 interrupt should come within 2ms, that's a very short time. Let's increase the timeout to be really sure that we don't get an accidnetal timeout. One case in particular this is useful is if you've got a serial console and printk in just the right places. Under that scenario I've seen delays of up to 130ms before the interrupt fired. CMD11 is only sent during card insertion, so this extra timeout shouldn't be terrible. Fixes: 5c935165da79 ("mmc: dw_mmc: Add a timeout for sending CMD11") Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/dw_mmc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 8ce9a52d365b..b613845396a1 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1024,11 +1024,13 @@ static void __dw_mci_start_request(struct dw_mci *host,
1024 1024
1025 if (cmd->opcode == SD_SWITCH_VOLTAGE) { 1025 if (cmd->opcode == SD_SWITCH_VOLTAGE) {
1026 /* 1026 /*
1027 * Databook says to fail after 2ms w/ no response; give an 1027 * Databook says to fail after 2ms w/ no response, but evidence
1028 * extra jiffy just in case we're about to roll over. 1028 * shows that sometimes the cmd11 interrupt takes over 130ms.
1029 * We'll set to 500ms, plus an extra jiffy just in case jiffies
1030 * is just about to roll over.
1029 */ 1031 */
1030 mod_timer(&host->cmd11_timer, 1032 mod_timer(&host->cmd11_timer,
1031 jiffies + msecs_to_jiffies(2) + 1); 1033 jiffies + msecs_to_jiffies(500) + 1);
1032 } 1034 }
1033 1035
1034 if (mrq->stop) 1036 if (mrq->stop)