Commit ed54ef98 authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti Committed by Ulf Hansson

mmc: core: Set default power mode in mmc_alloc_host()

Set the default power mode, MMC_POWER_UNDEFINED, in mmc_alloc_host() rather
than in mmc_start_host(). This enables host drivers to make use of the
initial state during ->probe().

Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> Link:
https://lore.kernel.org/r/1592919288-1020-3-git-send-email-vbadigan@codeaurora.orgSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 0fcb031e
...@@ -2303,7 +2303,6 @@ void mmc_start_host(struct mmc_host *host) ...@@ -2303,7 +2303,6 @@ void mmc_start_host(struct mmc_host *host)
{ {
host->f_init = max(min(freqs[0], host->f_max), host->f_min); host->f_init = max(min(freqs[0], host->f_max), host->f_min);
host->rescan_disable = 0; host->rescan_disable = 0;
host->ios.power_mode = MMC_POWER_UNDEFINED;
if (!(host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)) { if (!(host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)) {
mmc_claim_host(host); mmc_claim_host(host);
......
...@@ -434,6 +434,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) ...@@ -434,6 +434,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
host->fixed_drv_type = -EINVAL; host->fixed_drv_type = -EINVAL;
host->ios.power_delay_ms = 10; host->ios.power_delay_ms = 10;
host->ios.power_mode = MMC_POWER_UNDEFINED;
return host; return host;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment