summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2012-04-01 05:29:45 +0200
committerChris Ball <cjb@laptop.org>2012-04-06 01:57:58 +0200
commit0d22c77089c86416324d0d87e7ef8cfa931e53cd (patch)
tree50b8d7b7294c95c65ee1fb992da066fcefd9df6c /drivers/mmc/host
parentmmc: sdhci-s3c: Remove usage of clk_type member in platform data (diff)
downloadlinux-0d22c77089c86416324d0d87e7ef8cfa931e53cd.tar.xz
linux-0d22c77089c86416324d0d87e7ef8cfa931e53cd.zip
mmc: sdhci-s3c: derive transfer width host cap from max_width in platdata
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 <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/sdhci-s3c.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 5fce14385910..dab1a770cb8a 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->pm_caps)
host->mmc->pm_caps |= pdata->pm_caps;