aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorkishore kadiyala <kishore.kadiyala@ti.com>2010-10-01 19:35:28 -0400
committerTony Lindgren <tony@atomide.com>2010-10-01 19:35:28 -0400
commit64be97822b781e921c7eda2d4089fd1fdf3aabba (patch)
tree418919f2ab1d1796364fdcc9a39cb904b75450db /drivers/mmc/host
parent91a0b089f8358aec866bc9c69da8b84c77beaaf3 (diff)
omap4 hsmmc: Update ocr mask for MMC2 for regulator to use
On OMAP4, MMC2 controller has eMMC which draws power from VAUX regulator on TWL. Though the eMMC supports dual voltage[1.8v/3v] as per ocr register, its VCC is fixed at 3V for operation. With this once the mmc core selects the minimum voltage[1.8] supported based on the ocr value read from OCR register, eMMC will not get detected. Thus the platform data for MMC2 is updated with ocr mask and same will be communicated to core which will set the regulator to always operate at 3V when ever turned ON. Cc: Tony Lindgren <tony@atomide.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Madhusudhan Chikkature <madhu.cr@ti.com> Cc: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c12
1 files changed, 12 insertions, 0 deletions
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 */