diff options
author | Dong Aisheng <b29396@freescale.com> | 2013-12-31 03:22:44 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:47:35 -0400 |
commit | 7bf5a9b81d2622756c83b6630ac57d38add9d137 (patch) | |
tree | 67d74a4c8bc27d19eff2b703be909bcb8fed7d36 /drivers/mmc/host/sdhci.c | |
parent | 3773622ae8e6b27a5b470bce691b7ec4249597ac (diff) |
ENGR00295184-1 mmc: sdhci: do not enable card detect interrupt for gpio cd type
Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
we also do not need to handle controller native card detect interrupt
for gpio as card detect case.
If we wrong enabled the card detect interrupt for gpio case,
it will cause a lot of unexpected card detect interrupts during data transfer
which should not happen.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index dfa71b32c8e0..72ba46d4db82 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -155,9 +155,11 @@ static void sdhci_mask_irqs(struct sdhci_host *host, u32 irqs) | |||
155 | static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) | 155 | static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) |
156 | { | 156 | { |
157 | u32 present, irqs; | 157 | u32 present, irqs; |
158 | int gpio_cd = mmc_gpio_get_cd(host->mmc); | ||
158 | 159 | ||
159 | if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || | 160 | if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || |
160 | (host->mmc->caps & MMC_CAP_NONREMOVABLE)) | 161 | (host->mmc->caps & MMC_CAP_NONREMOVABLE) || |
162 | !IS_ERR_VALUE(gpio_cd)) | ||
161 | return; | 163 | return; |
162 | 164 | ||
163 | present = sdhci_readl(host, SDHCI_PRESENT_STATE) & | 165 | present = sdhci_readl(host, SDHCI_PRESENT_STATE) & |