aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 044cd016320e..66121633c9cd 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1113,7 +1113,8 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
1113 int tmp; 1113 int tmp;
1114 int voltage; 1114 int voltage;
1115 1115
1116 /* REVISIT mmc_vddrange_to_ocrmask() may have set some 1116 /*
1117 * REVISIT mmc_vddrange_to_ocrmask() may have set some
1117 * bits this regulator doesn't quite support ... don't 1118 * bits this regulator doesn't quite support ... don't
1118 * be too picky, most cards and regulators are OK with 1119 * be too picky, most cards and regulators are OK with
1119 * a 0.1V range goof (it's a small error percentage). 1120 * a 0.1V range goof (it's a small error percentage).
@@ -1127,12 +1128,13 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
1127 max_uV = min_uV + 100 * 1000; 1128 max_uV = min_uV + 100 * 1000;
1128 } 1129 }
1129 1130
1130 /* avoid needless changes to this voltage; the regulator 1131 /*
1131 * might not allow this operation 1132 * If we're using a fixed/static regulator, don't call
1133 * regulator_set_voltage; it would fail.
1132 */ 1134 */
1133 voltage = regulator_get_voltage(supply); 1135 voltage = regulator_get_voltage(supply);
1134 1136
1135 if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE) 1137 if (regulator_count_voltages(supply) == 1)
1136 min_uV = max_uV = voltage; 1138 min_uV = max_uV = voltage;
1137 1139
1138 if (voltage < 0) 1140 if (voltage < 0)