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: 2126 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E68C323DE6 for ; Tue, 21 Jun 2011 14:32:59 +0000 (UTC) Received: from mail-vw0-f52.google.com (mail-vw0-f52.google.com [209.85.212.52]) by fiordland.canonical.com (Postfix) with ESMTP id AD9EDA18406 for ; Tue, 21 Jun 2011 14:32:59 +0000 (UTC) Received: by mail-vw0-f52.google.com with SMTP id 16so4746427vws.11 for ; Tue, 21 Jun 2011 07:32:59 -0700 (PDT) Received: by 10.52.163.6 with SMTP id ye6mr333431vdb.127.1308666779231; Tue, 21 Jun 2011 07:32:59 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs71555vdc; Tue, 21 Jun 2011 07:32:59 -0700 (PDT) Received: by 10.236.138.161 with SMTP id a21mr9086624yhj.49.1308666778851; Tue, 21 Jun 2011 07:32:58 -0700 (PDT) Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id i4si21896043icn.31.2011.06.21.07.32.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 07:32:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.214.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by mail-iw0-f178.google.com with SMTP id 10so958485iwc.37 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 Cc: Chris Ball , Wolfram Sang , Arnaud Patard , Eric Benard , Philip Rakity , linux-arm-kernel@lists.infradead.org, patches@linaro.org, Shawn Guo , 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> 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;