From: "Ivan T. Ivanov" <ivan.ivanov@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Tim Kryger <tim.kryger@gmail.com>,
Aisheng Dong <b29396@freescale.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH 3/3] mmc: sdhci: properly check card present state when quirk NO_CARD_NO_RESET is set
Date: Fri, 26 Jun 2015 13:00:10 +0300 [thread overview]
Message-ID: <1435312810-23957-4-git-send-email-ivan.ivanov@linaro.org> (raw)
In-Reply-To: <1435312810-23957-1-git-send-email-ivan.ivanov@linaro.org>
Controller could have both NO_CARD_NO_RESET and BROKEN_CARD_DETECTION
quirks set. Use sdhci_do_get_cd() when applying NO_CARD_NO_RESET, which
properly check for BROKEN_CARD_DETECTION quirk.
Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
---
drivers/mmc/host/sdhci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0b65752..912a3bb 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -207,8 +207,7 @@ EXPORT_SYMBOL_GPL(sdhci_reset);
static void sdhci_do_reset(struct sdhci_host *host, u8 mask)
{
if (host->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) {
- if (!(sdhci_readl(host, SDHCI_PRESENT_STATE) &
- SDHCI_CARD_PRESENT))
+ if (!sdhci_do_get_cd(host))
return;
}
--
1.9.1
next prev parent reply other threads:[~2015-06-26 10:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 10:00 [PATCH 0/3] mmc: sdhci: Card detection fixes Ivan T. Ivanov
2015-06-26 10:00 ` [PATCH 1/3] mmc: sdhci: let GPIO based card detection have higher precedence Ivan T. Ivanov
2015-06-26 10:19 ` Adrian Hunter
2015-06-26 11:00 ` Ivan T. Ivanov
2015-06-26 11:09 ` Adrian Hunter
2015-06-26 11:12 ` Ivan T. Ivanov
2015-06-26 10:00 ` [PATCH 2/3] mmc: sdhci: don't use card state polling when CD GPIO is defined Ivan T. Ivanov
2015-06-26 10:00 ` Ivan T. Ivanov [this message]
2015-06-26 10:31 ` [PATCH 0/3] mmc: sdhci: Card detection fixes Jaehoon Chung
2015-06-26 11:05 ` Ivan T. Ivanov
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=1435312810-23957-4-git-send-email-ivan.ivanov@linaro.org \
--to=ivan.ivanov@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=b29396@freescale.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tim.kryger@gmail.com \
--cc=ulf.hansson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).