From patchwork Wed Jun 15 11:15:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1917 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 838D624B31 for ; Wed, 15 Jun 2011 11:10:07 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4B433A1892A for ; Wed, 15 Jun 2011 11:10:07 +0000 (UTC) Received: by vxk12 with SMTP id 12so251839vxk.11 for ; Wed, 15 Jun 2011 04:10:06 -0700 (PDT) Received: by 10.52.162.72 with SMTP id xy8mr567584vdb.87.1308136206751; Wed, 15 Jun 2011 04:10:06 -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 em2cs118255vdc; Wed, 15 Jun 2011 04:10:06 -0700 (PDT) Received: by 10.227.184.65 with SMTP id cj1mr438642wbb.51.1308136204647; Wed, 15 Jun 2011 04:10:04 -0700 (PDT) Received: from DB3EHSOBE005.bigfish.com (db3ehsobe005.messaging.microsoft.com [213.199.154.143]) by mx.google.com with ESMTPS id es5si914554wbb.90.2011.06.15.04.10.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Jun 2011 04:10:04 -0700 (PDT) Received-SPF: neutral (google.com: 213.199.154.143 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=213.199.154.143; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.143 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: from mail76-db3-R.bigfish.com (10.3.81.249) by DB3EHSOBE005.bigfish.com (10.3.84.25) with Microsoft SMTP Server id 14.1.225.22; Wed, 15 Jun 2011 11:10:03 +0000 Received: from mail76-db3 (localhost.localdomain [127.0.0.1]) by mail76-db3-R.bigfish.com (Postfix) with ESMTP id 59970E8838A; Wed, 15 Jun 2011 11:10:03 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail76-db3 (localhost.localdomain [127.0.0.1]) by mail76-db3 (MessageSwitch) id 1308136201478098_12152; Wed, 15 Jun 2011 11:10:01 +0000 (UTC) Received: from DB3EHSMHS018.bigfish.com (unknown [10.3.81.247]) by mail76-db3.bigfish.com (Postfix) with ESMTP id 481F81E0052; Wed, 15 Jun 2011 11:09:59 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS018.bigfish.com (10.3.87.118) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 15 Jun 2011 11:09:59 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.289.8; Wed, 15 Jun 2011 06:09:57 -0500 Received: from S2100-06.ap.freescale.net (S2100-06.ap.freescale.net [10.192.242.125]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p5FB9l3G013936; Wed, 15 Jun 2011 06:09:54 -0500 (CDT) From: Shawn Guo To: CC: Chris Ball , Wolfram Sang , Arnaud Patard , Eric Benard , Pavel Machek , , , , Shawn Guo Subject: [PATCH v2 2/4] mmc: sdhci-esdhc-imx: SDHCI_CARD_PRESENT does not get cleared Date: Wed, 15 Jun 2011 19:15:20 +0800 Message-ID: <1308136522-3403-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308136522-3403-1-git-send-email-shawn.guo@linaro.org> References: <1308136522-3403-1-git-send-email-shawn.guo@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com 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;