aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/sdhci.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 8f61f8d6e0ca..f76736b50bc7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2844,6 +2844,23 @@ int sdhci_add_host(struct sdhci_host *host)
2844 host->vmmc = NULL; 2844 host->vmmc = NULL;
2845 } 2845 }
2846 2846
2847#ifdef CONFIG_REGULATOR
2848 if (host->vmmc) {
2849 ret = regulator_is_supported_voltage(host->vmmc, 3300000,
2850 3300000);
2851 if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))
2852 caps[0] &= ~SDHCI_CAN_VDD_330;
2853 ret = regulator_is_supported_voltage(host->vmmc, 3000000,
2854 3000000);
2855 if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_300)))
2856 caps[0] &= ~SDHCI_CAN_VDD_300;
2857 ret = regulator_is_supported_voltage(host->vmmc, 1800000,
2858 1800000);
2859 if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_180)))
2860 caps[0] &= ~SDHCI_CAN_VDD_180;
2861 }
2862#endif /* CONFIG_REGULATOR */
2863
2847 /* 2864 /*
2848 * According to SD Host Controller spec v3.00, if the Host System 2865 * According to SD Host Controller spec v3.00, if the Host System
2849 * can afford more than 150mA, Host Driver should set XPC to 1. Also 2866 * can afford more than 150mA, Host Driver should set XPC to 1. Also