linux-3.0.x for AP-SH4A-0A Board
Revision | fbbc165db18d24de056e50d8ae7d6f1aa3b198fe (tree) |
---|---|
Time | 2011-08-05 13:58:31 |
Author | Shawn Guo <shawn.guo@lina...> |
Commiter | Greg Kroah-Hartman |
mmc: sdhci-esdhc-imx: SDHCI_CARD_PRESENT does not get cleared
commit 803862a6f7de4939e0a557214e5e4b37e36f87ff upstream.
The function esdhc_readl_le intends to clear bit SDHCI_CARD_PRESENT,
when the card detect gpio tells there is no card. But it does not
clear the bit actually. The patch gives a fix on that.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
@@ -74,7 +74,7 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) | ||
74 | 74 | if (boarddata && gpio_is_valid(boarddata->cd_gpio) |
75 | 75 | && gpio_get_value(boarddata->cd_gpio)) |
76 | 76 | /* no card, if a valid gpio says so... */ |
77 | - val &= SDHCI_CARD_PRESENT; | |
77 | + val &= ~SDHCI_CARD_PRESENT; | |
78 | 78 | else |
79 | 79 | /* ... in all other cases assume card is present */ |
80 | 80 | val |= SDHCI_CARD_PRESENT; |