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

Skip to content
Commit 1a5c0d16 authored by Subhash Jadavani's avatar Subhash Jadavani Committed by Stephen Boyd
Browse files

mmc: sd: fix the issue with paranoid SD card init retry



mmc_resume_host() is called during resume (runtime or system) which calls
	1. mmc_power_up
	2. mmc_select_voltage
	3. host->bus_ops->resume() (mmc_sd_resume())

mmc_sd_resume() ultimately calls mmc_sd_init_card() to initialize the
SD card. But let's say if mmc_sd_init_card() fails during the
execute_tuning(). At this point, host controller timing is changed
to SDR104/SDR50 mode and host clock will also be > 100 MHz.

If there is an error returned by mmc_sd_init_card() and
if CONFIG_MMC_PARANOID_SD_INIT defined, it retries by calling
mmc_sd_init_card() without making sure that host controller timing
and clock be initialized again. This may cause the further
mmc_sd_init_card() also to fail.

To fix this, mmc_sd_resume() should call mmc_power_up()
and mmc_select_voltage() before retrying.

Change-Id: I8de39ea547fa0d5eca478719a4cf9255b6652503
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 857c5db7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment