Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51aa66a5 authored by Subhash Jadavani's avatar Subhash Jadavani Committed by Chris Ball
Browse files

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: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 7810cc1e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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) {