aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/omap_hsmmc.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index cfb4b48c212b..11e8c8fe46dc 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -241,28 +241,7 @@ static int omap_hsmmc_resume_cdirq(struct device *dev, int slot)
241 241
242#ifdef CONFIG_REGULATOR 242#ifdef CONFIG_REGULATOR
243 243
244static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on, 244static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
245 int vdd)
246{
247 struct omap_hsmmc_host *host =
248 platform_get_drvdata(to_platform_device(dev));
249 int ret;
250
251 if (mmc_slot(host).before_set_reg)
252 mmc_slot(host).before_set_reg(dev, slot, power_on, vdd);
253
254 if (power_on)
255 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd);
256 else
257 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, 0);
258
259 if (mmc_slot(host).after_set_reg)
260 mmc_slot(host).after_set_reg(dev, slot, power_on, vdd);
261
262 return ret;
263}
264
265static int omap_hsmmc_235_set_power(struct device *dev, int slot, int power_on,
266 int vdd) 245 int vdd)
267{ 246{
268 struct omap_hsmmc_host *host = 247 struct omap_hsmmc_host *host =
@@ -332,14 +311,11 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
332 311
333 switch (host->id) { 312 switch (host->id) {
334 case OMAP_MMC1_DEVID: 313 case OMAP_MMC1_DEVID:
335 /* On-chip level shifting via PBIAS0/PBIAS1 */
336 mmc_slot(host).set_power = omap_hsmmc_1_set_power;
337 break;
338 case OMAP_MMC2_DEVID: 314 case OMAP_MMC2_DEVID:
339 case OMAP_MMC3_DEVID: 315 case OMAP_MMC3_DEVID:
340 case OMAP_MMC5_DEVID: 316 case OMAP_MMC5_DEVID:
341 /* Off-chip level shifting, or none */ 317 /* On-chip level shifting via PBIAS0/PBIAS1 */
342 mmc_slot(host).set_power = omap_hsmmc_235_set_power; 318 mmc_slot(host).set_power = omap_hsmmc_set_power;
343 break; 319 break;
344 case OMAP_MMC4_DEVID: 320 case OMAP_MMC4_DEVID:
345 mmc_slot(host).set_power = omap_hsmmc_4_set_power; 321 mmc_slot(host).set_power = omap_hsmmc_4_set_power;