aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-11-18 10:28:39 +0000
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-11-18 10:28:39 +0000
commit23a0fedb1db59a6af0a7d550c5b4b06eead3e553 (patch)
tree452bc080a5023113d31bcc1622049348ee8bcb4c
parent8d997cc4bce41f23e9275eef87d85dd223082853 (diff)
parent3fe9c5125a7c0c6cf60cdf492be703db7a90e05d (diff)
Merge branch 'tracking-qcomlt-card-detect' into integration-linux-qcomlt
* tracking-qcomlt-card-detect: mmc: sdhci-msm: Add SDHCI_QUIRK_NO_CARD_NO_RESET mmc: sdhci: let GPIO based card detection have higher precedence
-rw-r--r--drivers/mmc/host/sdhci-msm.c1
-rw-r--r--drivers/mmc/host/sdhci.c9
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 4bcee033feda..4fbbc9712e6a 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -522,6 +522,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
/* Set HC_MODE_EN bit in HC_MODE register */
writel_relaxed(HC_MODE_EN, (msm_host->core_mem + CORE_HC_MODE));
+ host->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
host->quirks |= SDHCI_QUIRK_SINGLE_POWER_WRITE;
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index fbc7efdddcb5..c21801a4556d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1621,10 +1621,6 @@ static int sdhci_do_get_cd(struct sdhci_host *host)
if (host->flags & SDHCI_DEVICE_DEAD)
return 0;
- /* If nonremovable, assume that the card is always present. */
- if (host->mmc->caps & MMC_CAP_NONREMOVABLE)
- return 1;
-
/*
* Try slot gpio detect, if defined it take precedence
* over build in controller functionality
@@ -1632,8 +1628,9 @@ static int sdhci_do_get_cd(struct sdhci_host *host)
if (!IS_ERR_VALUE(gpio_cd))
return !!gpio_cd;
- /* If polling, assume that the card is always present. */
- if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
+ /* If polling/nonremovable, assume that the card is always present. */
+ if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
+ (host->mmc->caps & MMC_CAP_NONREMOVABLE))
return 1;
/* Host native card detect */