summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorIvan T. Ivanov <ivan.ivanov@linaro.org>2015-07-06 15:16:21 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2015-08-17 11:32:44 +0200
commit135b0a284d9c2bcfb64a5f7d90c439ede8bc5e06 (patch)
tree737f6be151e18e8d108710b6482f474e40809699 /drivers/mmc/host/sdhci.c
parentc31d22eb335d4e3d2016135038fac8daaa9708d6 (diff)
mmc: sdhci: properly check card present state when quirk NO_CARD_NO_RESET is set
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> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index cb138d6ad1f2..c83d11080da0 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;
}