diff options
author | Subhash Jadavani <subhashj@codeaurora.org> | 2012-12-04 15:36:18 +0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-01-28 15:51:31 +0400 |
commit | af321b13cffc080451f5e802e041decf60666d26 (patch) | |
tree | f3fad8e6ed0a1ad851d599f1a846bcce7dd39852 | |
parent | 949db153b6466c6f7cad5a427ecea94985927311 (diff) | |
download | linux-af321b13cffc080451f5e802e041decf60666d26.tar.xz |
mmc: sdio: fix resume failure due to lack of CMD52 reset
If SDIO keep power flag (MMC_PM_KEEP_POWER) is not set, card would
be reinitialized during resume but as we are not resetting
(CMD52 reset) the SDIO card during this reinitialization, card may
fail to respond back to subsequent commands (CMD5 etc...).
This change resets the card before the reinitialization of card
during resume.
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/core/sdio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 2273ce6b6c1a..34ad4c877c1f 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -937,10 +937,12 @@ static int mmc_sdio_resume(struct mmc_host *host) mmc_claim_host(host); /* No need to reinitialize powered-resumed nonremovable cards */ - if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) + if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) { + sdio_reset(host); + mmc_go_idle(host); err = mmc_sdio_init_card(host, host->ocr, host->card, mmc_card_keep_power(host)); - else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { + } else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { /* We may have switched to 1-bit mode during suspend */ err = sdio_enable_4bit_bus(host->card); if (err > 0) { |