Thread (17 messages) 17 messages, 8 authors, 2012-03-30
STALE5176d

[PATCH v3 4/6] mmc: sdhci-s3c: derive transfer width host capability from max_width in platform data

From: Thomas Abraham <hidden>
Date: 2012-01-31 17:56:14
Also in: linux-arm-kernel, linux-mmc, linux-samsung-soc
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, secure digital host controller interface (sdhci) driver, secure digital host controller interface (sdhci) samsung driver, the rest · Maintainers: Ulf Hansson, Adrian Hunter, Ben Dooks, Jaehoon Chung, Linus Torvalds

max_width member in platform data can be used to derive the mmc bus transfer
width that can be supported by the controller.

Signed-off-by: Thomas Abraham <redacted>
---
 drivers/mmc/host/sdhci-s3c.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index e1b685d..a57d7a0 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -562,6 +562,14 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
 	if (pdata->cd_type == S3C_SDHCI_CD_PERMANENT)
 		host->mmc->caps = MMC_CAP_NONREMOVABLE;
 
+	switch (pdata->max_width) {
+	case 8:
+		host->mmc->caps |= MMC_CAP_8_BIT_DATA;
+	case 4:
+		host->mmc->caps |= MMC_CAP_4_BIT_DATA;
+		break;
+	}
+
 	if (pdata->host_caps)
 		host->mmc->caps |= pdata->host_caps;
 
-- 
1.6.6.rc2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help