diff options
author | Abhishek Aggarwal <aaggarwal@nvidia.com> | 2010-02-24 14:38:19 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-02-24 09:01:23 -0800 |
commit | 829e8e97ebd5b86995acbfae4511d24bc59496e4 (patch) | |
tree | 815100da6ee0c65af0548076111d0b2047f688c0 /drivers/mmc/host | |
parent | 26e700c8d60692294a776596a6753ea6cf894ef7 (diff) |
tegra mmc: Impelement new present state quirk for sdhci-tegra.
Enabled new present state quirk(SDHCI_QUIRK_PRESENT_STATE_REGISTER_INVALID)
for tegra and modified the driver to report the card present status
based on GPIO.
Part of fix for Bug 619171
Change-Id: I2003fa4210818cb477910df56ccd0f1f4f62fd56
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 07f365c2212d..b7df21fd977a 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -61,19 +61,10 @@ static int tegra_sdhci_enable_dma(struct sdhci_host *host) return 0; } -static void do_handle_cardetect(void *args) -{ - struct sdhci_host *sdhost = (struct sdhci_host *)args; - struct tegra_sdhci *t_sdhci = sdhci_priv(sdhost); - - sdhci_card_detect_callback(sdhost); - NvRmGpioInterruptDone(t_sdhci->cd_int); -} - /* - * Return 0 if the card is inserted. + * Return 0 if the card is removed. * -ve if the feature is not supported. - * +ve if the card is removed. + * +ve if the card is inserted. */ static int tegra_sdhci_isCardInserted(struct sdhci_host *host) { @@ -89,6 +80,16 @@ static int tegra_sdhci_isCardInserted(struct sdhci_host *host) return -1; } +static void do_handle_cardetect(void *args) +{ + struct sdhci_host *sdhost = (struct sdhci_host *)args; + struct tegra_sdhci *t_sdhci = sdhci_priv(sdhost); + + sdhci_card_detect_callback(sdhost); + sdhost->card_present = tegra_sdhci_isCardInserted(sdhost); + NvRmGpioInterruptDone(t_sdhci->cd_int); +} + /* * Return * -ve value if not supported. @@ -293,7 +294,8 @@ int __init tegra_sdhci_probe(struct platform_device *pdev) SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_SINGLE_POWER_WRITE | SDHCI_QUIRK_ENABLE_INTERRUPT_AT_BLOCK_GAP | - SDHCI_QUIRK_BROKEN_WRITE_PROTECT | + SDHCI_QUIRK_BROKEN_WRITE_PROTECT | + SDHCI_QUIRK_PRESENT_STATE_REGISTER_INVALID | SDHCI_QUIRK_BROKEN_CTRL_HISPD; if (!pSdioCaps->EnableDmaSupport) |