aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-09-07 05:22:09 -0400
committerChris Ball <cjb@laptop.org>2011-10-26 15:43:42 -0400
commit041beb1d531f538bf62377e2ca2b4ecbaa479d75 (patch)
tree40d7f71f8e78f2bed9ccf0db79ea25d4fc17170d /drivers/mmc/core/core.c
parent55cd65e48b62c6f08edbb93d5cadf96e876ebcc2 (diff)
mmc: core: add a short delay in mmc_power_off
Stress-testing the runtime power management of libertas_sdio through a rmmod/insmod loop revealed that it is quite easy to cause an ETIMEDOUT failure in mmc_sdio_power_restore() leading to: libertas_sdio: probe of mmc1:0001:1 failed with error -16 Experimentation shows that a very short delay (100us) is needed in the power down path before the card can be successfully booted again. We know that this setup is lacking poweroff clamps on the card's power lines, but as only a short delay is needed, apply this unconditionally. Also bump up to 1ms sleep for extra legroom. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 557856b6f95..7289e999d1f 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1214,6 +1214,13 @@ static void mmc_power_off(struct mmc_host *host)
1214 host->ios.timing = MMC_TIMING_LEGACY; 1214 host->ios.timing = MMC_TIMING_LEGACY;
1215 mmc_set_ios(host); 1215 mmc_set_ios(host);
1216 1216
1217 /*
1218 * Some configurations, such as the 802.11 SDIO card in the OLPC
1219 * XO-1.5, require a short delay after poweroff before the card
1220 * can be successfully turned on again.
1221 */
1222 mmc_delay(1);
1223
1217 mmc_host_clk_release(host); 1224 mmc_host_clk_release(host);
1218} 1225}
1219 1226