aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2012-12-04 06:36:18 -0500
committerChris Ball <cjb@laptop.org>2013-02-11 12:51:22 -0500
commit51aa66a58494f869f491eedda86c409c50536c14 (patch)
treeeb07d3ad3baa92e9832329bec03e105f861cfa35 /drivers/mmc/core/sdio.c
parent7810cc1e7721220f1ed2a23ca95113d6434f6dcd (diff)
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>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c6
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)
937 mmc_claim_host(host); 937 mmc_claim_host(host);
938 938
939 /* No need to reinitialize powered-resumed nonremovable cards */ 939 /* No need to reinitialize powered-resumed nonremovable cards */
940 if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) 940 if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) {
941 sdio_reset(host);
942 mmc_go_idle(host);
941 err = mmc_sdio_init_card(host, host->ocr, host->card, 943 err = mmc_sdio_init_card(host, host->ocr, host->card,
942 mmc_card_keep_power(host)); 944 mmc_card_keep_power(host));
943 else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { 945 } else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) {
944 /* We may have switched to 1-bit mode during suspend */ 946 /* We may have switched to 1-bit mode during suspend */
945 err = sdio_enable_4bit_bus(host->card); 947 err = sdio_enable_4bit_bus(host->card);
946 if (err > 0) { 948 if (err > 0) {