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

Commit 3498a2f3 authored by Bao D. Nguyen's avatar Bao D. Nguyen
Browse files

mmc: core: Send SD card initialization sequence in deferred resume path



During suspend the SD card power is removed. With deferred resume
feature enabled, during resume the SD card power is turned on; however,
the full SD card initialization sequence is missing. As a result, the
first SD card access fails with command timeouts. Add SD card
initialization to the deferred resume path so that the SD card is
initialized to fully operational state.

Change-Id: I85e02aa78016644432e694bcbc009869035d0b58
Signed-off-by: default avatarBao D. Nguyen <nguyenb@codeaurora.org>
parent 40628cae
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2863,10 +2863,13 @@ static int mmc_resume(struct mmc_host *host)
	int err = 0;

	MMC_TRACE(host, "%s: Enter\n", __func__);
	err = _mmc_resume(host);
	pm_runtime_set_active(&host->card->dev);
	pm_runtime_mark_last_busy(&host->card->dev);
	pm_runtime_enable(&host->card->dev);

	MMC_TRACE(host, "%s: Exit err: %d\n", __func__, err);
	return 0;

	return err;
}

#define MAX_DEFER_SUSPEND_COUNTER 20
+5 −2
Original line number Diff line number Diff line
@@ -1348,10 +1348,13 @@ static int mmc_sd_resume(struct mmc_host *host)
	int err = 0;

	MMC_TRACE(host, "%s: Enter\n", __func__);
	err = _mmc_sd_resume(host);
	pm_runtime_set_active(&host->card->dev);
	pm_runtime_mark_last_busy(&host->card->dev);
	pm_runtime_enable(&host->card->dev);

	MMC_TRACE(host, "%s: Exit err: %d\n", __func__, err);
	return 0;

	return err;
}

/*