From patchwork Mon Jun 20 10:38:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 896702 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5KASYh0016442 for ; Mon, 20 Jun 2011 10:29:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753601Ab1FTK3O (ORCPT ); Mon, 20 Jun 2011 06:29:14 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:37917 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753206Ab1FTK3N (ORCPT ); Mon, 20 Jun 2011 06:29:13 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so1058030iwn.19 for ; Mon, 20 Jun 2011 03:29:13 -0700 (PDT) Received: by 10.231.116.32 with SMTP id k32mr5149303ibq.119.1308565753399; Mon, 20 Jun 2011 03:29:13 -0700 (PDT) Received: from localhost.localdomain ([58.208.97.176]) by mx.google.com with ESMTPS id d10sm3113114ibb.32.2011.06.20.03.29.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Jun 2011 03:29:12 -0700 (PDT) From: Shawn Guo To: linux-mmc@vger.kernel.org Cc: Chris Ball , Wolfram Sang , Arnaud Patard , Eric Benard , linux-arm-kernel@lists.infradead.org, patches@linaro.org, Shawn Guo Subject: [PATCH v3 2/4] mmc: sdhci-esdhc-imx: SDHCI_CARD_PRESENT does not get cleared Date: Mon, 20 Jun 2011 18:38:43 +0800 Message-Id: <1308566325-11600-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308566325-11600-1-git-send-email-shawn.guo@linaro.org> References: <1308566325-11600-1-git-send-email-shawn.guo@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 20 Jun 2011 10:29:14 +0000 (UTC) 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;