@@ -2786,16 +2786,18 @@ int sdhci_add_host(struct sdhci_host *host)
*/
mmc->ops = &sdhci_ops;
mmc->f_max = host->max_clk;
- if (host->ops->get_min_clock)
+ if (host->ops->get_min_clock) {
mmc->f_min = host->ops->get_min_clock(host);
- else if (host->version >= SDHCI_SPEC_300) {
+ } else if (host->version >= SDHCI_SPEC_300) {
if (host->clk_mul) {
mmc->f_min = (host->max_clk * host->clk_mul) / 1024;
mmc->f_max = host->max_clk * host->clk_mul;
- } else
+ } else {
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300;
- } else
+ }
+ } else {
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
+ }
host->timeout_clk =
(caps[0] & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT;
@@ -2860,12 +2862,13 @@ int sdhci_add_host(struct sdhci_host *host)
mmc_hostname(mmc));
host->vqmmc = NULL;
}
- }
- else if (regulator_is_supported_voltage(host->vqmmc, 1800000, 1800000))
+ } else if (regulator_is_supported_voltage(host->vqmmc,
+ 1800000, 1800000)) {
regulator_enable(host->vqmmc);
- else
+ } else {
caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);
+ }
/* Any UHS-I mode in caps implies SDR12 and SDR25 support. */
if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
@@ -2921,8 +2924,9 @@ int sdhci_add_host(struct sdhci_host *host)
mmc_hostname(mmc));
host->vmmc = NULL;
}
- } else
+ } else {
regulator_enable(host->vmmc);
+ }
#ifdef CONFIG_REGULATOR
if (host->vmmc) {
Signed-off-by: Tushar Behera <tushar.behera@linaro.org> --- drivers/mmc/host/sdhci.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-)