From patchwork Thu Oct 28 06:00:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 286992 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9S60FRs004188 for ; Thu, 28 Oct 2010 06:00:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753972Ab0J1GAM (ORCPT ); Thu, 28 Oct 2010 02:00:12 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:43986 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753917Ab0J1GAM (ORCPT ); Thu, 28 Oct 2010 02:00:12 -0400 Received: by fxm16 with SMTP id 16so1581933fxm.19 for ; Wed, 27 Oct 2010 23:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=MIkAGVK1gLIX2tBZ90MneQBJsEXvsrHgvfDCeKlJiRg=; b=fSECjcLG1QQZliYT62aFmuw3HwQWc9wLQPTjq1HtY7sfYaqzdAvzHyyO/XEzGLFljw 3JWf0+fR2D1Nh48xZXByuJ/we6gqR0q71uaUSepvixQQnFyYBKBOj4CGOE54wJfVIZ+F 9HT7Fc4Z/OsbkHzXWiG9O0AX5UOIZn2jCUvpk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Fk+oPOlvf+ay0HzuNpqqGkLKwZ9TP+hr3soQbtHLQ9Z4oVbnIgPLNWuz0hxUOX7qtZ N1qTGHk7w+dcm7d8gpogJdGKaPZPhRZhYXmYHG85ldC0+W85KWK4umZe8CVhzWdmYfDX q5PUIi9S/Ppmgo+7KbG4FLuFhtT5TweY7Hpe0= MIME-Version: 1.0 Received: by 10.223.100.16 with SMTP id w16mr3365338fan.47.1288245610679; Wed, 27 Oct 2010 23:00:10 -0700 (PDT) Received: by 10.223.1.81 with HTTP; Wed, 27 Oct 2010 23:00:10 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Oct 2010 02:00:10 -0400 Message-ID: Subject: Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device From: zhangfei gao To: Kyungmin Park , Philip Rakity Cc: linux-mmc@vger.kernel.org, Chris Ball , Matt Fleming , eric.y.miao@gmail.com, Haojian Zhuang 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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Oct 2010 06:00:15 +0000 (UTC) From 470140b629e3f044a0951368db8e3dc98ebd8ab3 Mon Sep 17 00:00:00 2001 From: Zhangfei Gao Date: Thu, 28 Oct 2010 10:44:15 -0400 Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device, MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by default Signed-off-by: Zhangfei Gao CC: Philip Rakity --- arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++ drivers/mmc/host/sdhci-pxa.c | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h b/arch/arm/plat-pxa/include/plat/sdhci.h index e49c5b6..fc5ceab 100644 --- a/arch/arm/plat-pxa/include/plat/sdhci.h +++ b/arch/arm/plat-pxa/include/plat/sdhci.h @@ -16,6 +16,8 @@ /* pxa specific flag */ /* Require clock free running */ #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0) +/* card alwayes wired to host, like on-chip emmc */ +#define PXA_FLAG_CARD_PERMANENT (1<<1) /* * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c index fc406ac..8455c46 100644 --- a/drivers/mmc/host/sdhci-pxa.c +++ b/drivers/mmc/host/sdhci-pxa.c @@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct platform_device *pdev) host->irq = irq; host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; + if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) { + /* on-chip device */ + host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; + host->mmc->caps |= MMC_CAP_NONREMOVABLE; + } + if (pdata->quirks) host->quirks |= pdata->quirks; -- 1.7.0.4