From: yongd <yongd@marvell.com>
To: Chris Ball <cjb@laptop.org>,
Anton Vorontsov <anton.vorontsov@linaro.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Shawn Guo <shawn.guo@linaro.org>,
Wolfram Sang <w.sang@pengutronix.de>,
Daniel Drake <dsd@laptop.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Wilson Callan <wilson.callan@savantsystems.com>,
Ben Dooks <ben-linux@fluff.org>
Cc: zhangfei.gao@marvell.com, kevin.liu@marvell.com,
jlfu@marvell.com, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org, yongd <yongd@marvell.com>
Subject: [PATCH 1/3] mmc: esdhc: enable polling to detect card by itself
Date: Fri, 28 Sep 2012 18:28:31 +0800 [thread overview]
Message-ID: <1348828113-19668-2-git-send-email-yongd@marvell.com> (raw)
In-Reply-To: <1348828113-19668-1-git-send-email-yongd@marvell.com>
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. For
example, if the card detection type is ESDHC_CD_GPIO (external gpio pin
for CD), we will keep SDHCI_QUIRK_BROKEN_CARD_DETECTION set. This is right.
But, just as above said, sdhci_add_host() will also enable polling for such
a card. This is redundant.
On the other hand, for the card with ESDHC_CD_NONE detection type(no CD, neither
controller nor gpio, so use polling), we currently rely on sdhci_add_host() to
enable polling for us.
Here proposed a solution for such an embarrassing case. 1st, this patch will
de-couple polling enabling with sdhci_add_host() by doing this in host driver
itself, just as some other vendors. 2nd, one more patch will remove such improper
MMC_CAP_NEEDS_POLL enabling in sdhci_add_host().
Change-Id: Ia7525009d8fd188e3f0169f225e4a76ff9e94b47
Signed-off-by: yongd <yongd@marvell.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index e23f813..f70079c 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -569,6 +569,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
break;
case ESDHC_CD_NONE:
+ host->mmc->caps = MMC_CAP_NEEDS_POLL;
break;
}
--
1.7.9.5
next prev parent reply other threads:[~2012-09-28 10:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 10:28 (unknown), yongd
2012-09-28 10:28 ` yongd [this message]
2012-10-07 14:06 ` [PATCH 1/3] mmc: esdhc: enable polling to detect card by itself Shawn Guo
2012-10-17 4:01 ` Yong Ding
2012-10-18 5:50 ` Shawn Guo
2012-10-18 6:27 ` Yong Ding
2012-10-18 6:38 ` Shawn Guo
2012-10-18 7:19 ` Yong Ding
2012-09-28 10:28 ` [PATCH 2/3] mmc: sdhci-s3c: " yongd
2012-09-28 10:28 ` [PATCH 3/3] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host yongd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348828113-19668-2-git-send-email-yongd@marvell.com \
--to=yongd@marvell.com \
--cc=anton.vorontsov@linaro.org \
--cc=ben-linux@fluff.org \
--cc=cjb@laptop.org \
--cc=dsd@laptop.org \
--cc=jlfu@marvell.com \
--cc=kevin.liu@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.org \
--cc=w.sang@pengutronix.de \
--cc=wilson.callan@savantsystems.com \
--cc=zhangfei.gao@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox