From patchwork Tue Jun 21 14:41:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 901792 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5LEhqZm031420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2011 14:44:13 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ210-0006Qz-Mi; Tue, 21 Jun 2011 14:33:18 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZ20z-0006pN-R1; Tue, 21 Jun 2011 14:33:17 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ20g-0006j2-E8 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 14:33:03 +0000 Received: by mail-iy0-f177.google.com with SMTP id 15so2574044iyn.36 for ; Tue, 21 Jun 2011 07:32:58 -0700 (PDT) Received: by 10.42.161.130 with SMTP id t2mr7873518icx.5.1308666777903; Tue, 21 Jun 2011 07:32:57 -0700 (PDT) Received: from localhost.localdomain ([58.208.99.112]) by mx.google.com with ESMTPS id vn4sm6819433icb.19.2011.06.21.07.32.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 07:32:57 -0700 (PDT) From: Shawn Guo To: linux-mmc@vger.kernel.org Subject: [PATCH v4 2/4] mmc: sdhci-esdhc-imx: SDHCI_CARD_PRESENT does not get cleared Date: Tue, 21 Jun 2011 22:41:49 +0800 Message-Id: <1308667311-1855-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308667311-1855-1-git-send-email-shawn.guo@linaro.org> References: <1308667311-1855-1-git-send-email-shawn.guo@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110621_103258_633984_E5051764 X-CRM114-Status: GOOD ( 12.47 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] Cc: Chris Ball , patches@linaro.org, Wolfram Sang , Shawn Guo , Arnaud Patard , Eric Benard , Philip Rakity , stable@kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 21 Jun 2011 14:44:13 +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 Cc: --- 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;