From patchwork Fri Jun 10 10:42:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1810 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.45.109) by localhost6.localdomain6 with IMAP4-SSL; 10 Jun 2011 20:11:56 -0000 Delivered-To: patches@linaro.org Received: by 10.52.181.10 with SMTP id ds10cs303912vdc; Fri, 10 Jun 2011 03:34:33 -0700 (PDT) Received: by 10.90.62.4 with SMTP id k4mr2971809aga.53.1307702073255; Fri, 10 Jun 2011 03:34:33 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id j15si5440285anm.60.2011.06.10.03.34.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2011 03:34:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by pzk2 with SMTP id 2so1329499pzk.37 for ; Fri, 10 Jun 2011 03:34:32 -0700 (PDT) Received: by 10.68.29.69 with SMTP id i5mr873162pbh.62.1307702072015; Fri, 10 Jun 2011 03:34:32 -0700 (PDT) Received: from localhost.localdomain ([180.106.33.11]) by mx.google.com with ESMTPS id b8sm2219406pbj.78.2011.06.10.03.34.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2011 03:34:31 -0700 (PDT) From: Shawn Guo To: linux-mmc@vger.kernel.org Cc: Chris Ball , Wolfram Sang , Eric Benard , Arnaud Patard , kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, patches@linaro.org, Shawn Guo Subject: [PATCH 2/4] mmc: sdhci-esdhc-imx: SDHCI_CARD_PRESENT does not get cleared Date: Fri, 10 Jun 2011 18:42:50 +0800 Message-Id: <1307702572-22066-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1307702572-22066-1-git-send-email-shawn.guo@linaro.org> References: <1307702572-22066-1-git-send-email-shawn.guo@linaro.org> 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 Acked-by: Wolfram Sang --- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 248b8e5..94097c0 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -84,7 +84,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;