[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348828113-19668-3-git-send-email-yongd@marvell.com>
Date: Fri, 28 Sep 2012 18:28:32 +0800
From: yongd <yongd@...vell.com>
To: Chris Ball <cjb@...top.org>,
Anton Vorontsov <anton.vorontsov@...aro.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Shawn Guo <shawn.guo@...aro.org>,
Wolfram Sang <w.sang@...gutronix.de>,
Daniel Drake <dsd@...top.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Wilson Callan <wilson.callan@...antsystems.com>,
Ben Dooks <ben-linux@...ff.org>
Cc: zhangfei.gao@...vell.com, kevin.liu@...vell.com, jlfu@...vell.com,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
yongd <yongd@...vell.com>
Subject: [PATCH 2/3] mmc: sdhci-s3c: enable polling to detect card by itself
In the current code logic, sdhci_add_host() will enable the polling
method (set MMC_CAP_NEEDS_POLL) for a removable card (MMC_CAP_
NONREMOVABLE is not set) whose host's internal card detection method
is disabled for some reason (SDHCI_QUIRK_BROKEN_CARD_DETECTION is set).
However, this is improper since we can have some other card detection
methods besides host internal card detection and polling method. As a
result, sdhci_add_host() will redundantly enable polling for a card
which actually uses other methods, eg external GPIO.
So, we plan to remove such improper setting in sdhci_add_host(). But
before this, this patch is a MUST, which enables polling in host driver
itself when the detection type is S3C_SDHCI_CD_NONE.
Change-Id: I28bd6765e6c6a9dd6c288ff4ca6ecf7268a2d8ed
Signed-off-by: yongd <yongd@...vell.com>
---
drivers/mmc/host/sdhci-s3c.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 2903949..0701f08 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -687,6 +687,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
pdata->cd_type == S3C_SDHCI_CD_PERMANENT)
host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ if (pdata->cd_type == S3C_SDHCI_CD_NONE)
+ host->mmc->caps = MMC_CAP_NEEDS_POLL;
+
if (pdata->cd_type == S3C_SDHCI_CD_PERMANENT)
host->mmc->caps = MMC_CAP_NONREMOVABLE;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists