Skip to content

Commit

Permalink
mmc: core: Invoke mmc_pwrseq_post_power_on() prior MMC_POWER_ON state
Browse files Browse the repository at this point in the history
Host drivers have different ways to sends their "init stream" to the
card. Some need to do it as part of a request, some do it from the
->set_ios() callback in the MMC_POWER_ON state and some don't send an
"init stream" at all.

To be able to use the reset GPIOs from the simple MMC power sequence
provider, the card need to be powered and the "init stream" must not
have been sent.

To cope with these requirements, invoke mmc_pwrseq_post_power_on()
prior we change the state to MMC_POWER_ON in mmc_power_up().

Host drivers shall perform power up operations in the MMC_POWER_UP
state. Unfortunate three hosts (au1xmmc, cb710-mmc and toshsd) don't
conform to this expectation. Instead those ignore the MMC_POWER_UP
state and delays their power up operations to the MMC_POWER_ON state.

Those hosts needs to change their behavior to enable proper support for
the simple MMC power sequence provider.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
  • Loading branch information
Ulf Hansson committed Feb 3, 2015
1 parent c13045b commit 4febb7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,8 @@ void mmc_power_up(struct mmc_host *host, u32 ocr)
*/
mmc_delay(10);

mmc_pwrseq_post_power_on(host);

host->ios.clock = host->f_init;

host->ios.power_mode = MMC_POWER_ON;
Expand All @@ -1648,8 +1650,6 @@ void mmc_power_up(struct mmc_host *host, u32 ocr)
*/
mmc_delay(10);

mmc_pwrseq_post_power_on(host);

mmc_host_clk_release(host);
}

Expand Down

0 comments on commit 4febb7e

Please sign in to comment.