Thread (18 messages) 18 messages, 5 authors, 2012-09-19
STALE5049d

[PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

From: Tomasz Figa <hidden>
Date: 2012-09-04 08:50:05
Also in: linux-mmc, linux-samsung-soc
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, open firmware and flattened device tree bindings, secure digital host controller interface (sdhci) driver, secure digital host controller interface (sdhci) samsung driver, the rest · Maintainers: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Adrian Hunter, Ben Dooks, Jaehoon Chung, Linus Torvalds

Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
correctly.

Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Chris Ball <redacted>
CC: linux-mmc at vger.kernel.org
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
 drivers/mmc/host/sdhci-s3c.c                  | 3 +++
 2 files changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 8a6811f..ecbde68 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -16,6 +16,7 @@ Optional properties:
 - wp-inverted: when present, polarity on the wp gpio line is inverted
 - non-removable: non-removable slot (like eMMC)
 - max-frequency: maximum operating clock frequency
+- broken-voltage: vmmc regulator does not allow voltage control
 
 Example:
 
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 445910e..39715b8 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -443,6 +443,9 @@ static int __devinit sdhci_s3c_parse_dt(struct device *dev,
 	if (!ourhost->gpios)
 		return -ENOMEM;
 
+	if (of_get_property(node, "broken-voltage", 0))
+		pdata->host_caps2 |= MMC_CAP2_BROKEN_VOLTAGE;
+
 	/* get the card detection method */
 	if (of_get_property(node, "broken-cd", 0)) {
 		pdata->cd_type = S3C_SDHCI_CD_NONE;
-- 
1.7.12
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help