summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2009-09-22 16:45:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 07:39:40 -0700
commit27f6cb160b71b342b7a47d28a4b6c422ea74ccd1 (patch)
tree6a1618d1475961b5e42efbed7dd5410234e9888d /drivers
parenta13abc7b0814da7733c531453a207729b542ecf8 (diff)
downloadlinux-27f6cb160b71b342b7a47d28a4b6c422ea74ccd1.tar.gz
linux-27f6cb160b71b342b7a47d28a4b6c422ea74ccd1.tar.bz2
linux-27f6cb160b71b342b7a47d28a4b6c422ea74ccd1.zip
sdhci: increase timeout for internal clock stabilization.
On an OLPC XO-1.5 development board with Via VX855 chipset, the sdhci controller can take up to 12ms to stabilize its clock, but the current timeout at which we give up on the controller is 10ms. The patch increases the timeout delay rather than using a device-specific quirk -- since we exit the loop when the clock comes up, increasing the timeout value will only make us mdelay() longer in the errant case of a device with a clock that is not stabilizing, which it seems worth waiting a little longer for in general. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: Harald Welte <HaraldWelte@viatech.com> Acked-by: Pierre Ossman <pierre@ossman.eu> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9d0767687e12..c279fbc4c2e5 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -994,8 +994,8 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
clk |= SDHCI_CLOCK_INT_EN;
sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
- /* Wait max 10 ms */
- timeout = 10;
+ /* Wait max 20 ms */
+ timeout = 20;
while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL))
& SDHCI_CLOCK_INT_STABLE)) {
if (timeout == 0) {