aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c1
-rw-r--r--drivers/mmc/host/omap_hsmmc.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index cdb93734dd72..9f75dc2364c9 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -242,6 +242,7 @@ static struct omap2_hsmmc_info mmc[] = {
242 .gpio_cd = -EINVAL, 242 .gpio_cd = -EINVAL,
243 .gpio_wp = -EINVAL, 243 .gpio_wp = -EINVAL,
244 .nonremovable = true, 244 .nonremovable = true,
245 .ocr_mask = MMC_VDD_29_30,
245 }, 246 },
246 {} /* Terminator */ 247 {} /* Terminator */
247}; 248};
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index dc95756fd95c..4693e62145a6 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -364,6 +364,7 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
364{ 364{
365 struct regulator *reg; 365 struct regulator *reg;
366 int ret = 0; 366 int ret = 0;
367 int ocr_value = 0;
367 368
368 switch (host->id) { 369 switch (host->id) {
369 case OMAP_MMC1_DEVID: 370 case OMAP_MMC1_DEVID:
@@ -396,6 +397,17 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
396 } 397 }
397 } else { 398 } else {
398 host->vcc = reg; 399 host->vcc = reg;
400 ocr_value = mmc_regulator_get_ocrmask(reg);
401 if (!mmc_slot(host).ocr_mask) {
402 mmc_slot(host).ocr_mask = ocr_value;
403 } else {
404 if (!(mmc_slot(host).ocr_mask & ocr_value)) {
405 pr_err("MMC%d ocrmask %x is not supported\n",
406 host->id, mmc_slot(host).ocr_mask);
407 mmc_slot(host).ocr_mask = 0;
408 return -EINVAL;
409 }
410 }
399 mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg); 411 mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg);
400 412
401 /* Allow an aux regulator */ 413 /* Allow an aux regulator */