Skip to content
Snippets Groups Projects
Commit 803862a6 authored by Shawn Guo's avatar Shawn Guo Committed by Chris Ball
Browse files

mmc: sdhci-esdhc-imx: SDHCI_CARD_PRESENT does not get cleared


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: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent d25928d1
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg)
if (boarddata && gpio_is_valid(boarddata->cd_gpio)
&& gpio_get_value(boarddata->cd_gpio))
/* no card, if a valid gpio says so... */
val &= SDHCI_CARD_PRESENT;
val &= ~SDHCI_CARD_PRESENT;
else
/* ... in all other cases assume card is present */
val |= SDHCI_CARD_PRESENT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment