Thread (25 messages) 25 messages, 5 authors, 2012-11-27
STALE4955d
Revisions (3)
  1. v1 current
  2. v1 [diff vs current]
  3. v1 [diff vs current]

[PATCH 1/7] mmc: sh-mmcif: provide default allowed voltage

From: horms@verge.net.au (Simon Horman)
Date: 2012-11-26 00:16:48
Also in: linux-sh
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest · Maintainers: Ulf Hansson, Linus Torvalds

Use MMC_VDD_165_195 as the allowed voltages in the absence of
platform data. This should allow device tree to initialise MMCIF
for a number of boards.

A more complete solution would be to provide either MMCIF or MMC device
try bindings to set the allowed voltages.

Tested on the KZM-A9-GT board

Cc: Guennadi Liakhovetski <redacted>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 drivers/mmc/host/sh_mmcif.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 11d2bc3..88d6866 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1293,12 +1293,9 @@ static void sh_mmcif_init_ocr(struct sh_mmcif_host *host)
 
 	mmc_regulator_get_supply(mmc);
 
-	if (!pd)
-		return;
-
 	if (!mmc->ocr_avail)
-		mmc->ocr_avail = pd->ocr;
-	else if (pd->ocr)
+		mmc->ocr_avail = pd ? pd->ocr : MMC_VDD_165_195;
+	else if (pd && pd->ocr)
 		dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n");
 }
 
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help