summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-09-07 10:22:09 +0100
committerUlf HANSSON <ulf.hansson@stericsson.com>2011-10-10 12:00:48 +0200
commit600896a4c3eec1f36bfa2a9043dfaa6ecc333bf1 (patch)
treefdc0310c87e2c8298386984afe222e6bce5101df /drivers/mmc/core/core.c
parentf6b1cd62e67dddc3a1f05a21b2c8bca5b07d6bde (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> Change-Id: Iaaffdfa9cad62abe41113960da265ed7b3a528b7 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33408 Reviewed-by: QABUILD Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com>
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 a78af65996f..e473446073e 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1211,6 +1211,13 @@ void mmc_power_off(struct mmc_host *host)
host->ios.timing = MMC_TIMING_LEGACY;
mmc_set_ios(host);
+ /*
+ * Some configurations, such as the 802.11 SDIO card in the OLPC
+ * XO-1.5, require a short delay after poweroff before the card
+ * can be successfully turned on again.
+ */
+ mmc_delay(1);
+
mmc_host_clk_release(host);
}