From patchwork Tue Nov 9 11:37:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 311002 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 oA9Bc23j002839 for ; Tue, 9 Nov 2010 11:38:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755212Ab0KILiA (ORCPT ); Tue, 9 Nov 2010 06:38:00 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:46805 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755203Ab0KILh7 (ORCPT ); Tue, 9 Nov 2010 06:37:59 -0500 Received: by fxm16 with SMTP id 16so4839236fxm.19 for ; Tue, 09 Nov 2010 03:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=vYyWK0eA7ILLy/YmneV3gtNag/zQm5OgnS7x4ir644c=; b=KcztwlN00npIjXHyZN1wiFWVZ0HvAufpvJaGSzTQ8oPFKM0dcqT1b7lZwet6QOl6nL 3b0cwD565t81qFtKWNEObOQp8Olcc1IxGYyADSsQiUWBcZA4x/tQSGTvuCrfZQuKrqyh D3CLSAmEfqDHSo44lycbkKM8CNlFYfTPRRX7Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=uywcmvg4GXQ2WXCB76P5Z1tXANY0EsvBcYmcQ5TFbZ8mr6eMJWMjyPTPD38l08Wlki GzBBVPv2qimnVQ25RUZzuLdzaBheK3SaydWrcjIWAyw+Qmrqu+U/WBw6lvXrKc3cd/9M MseP8dRMFai0W3IFWtPaexmRmfQiSygaGLrFA= MIME-Version: 1.0 Received: by 10.223.86.196 with SMTP id t4mr3473805fal.34.1289302678125; Tue, 09 Nov 2010 03:37:58 -0800 (PST) Received: by 10.223.1.80 with HTTP; Tue, 9 Nov 2010 03:37:58 -0800 (PST) Date: Tue, 9 Nov 2010 06:37:58 -0500 Message-ID: Subject: [patch] sdhci: remove SDHCI_QUIRK_FORCE_1_BIT_DATA From: zhangfei gao To: linux-mmc@vger.kernel.org, Xiaobo Xie , Anton Vorontsov Cc: Chris Ball , Kyungmin Park , Philip Rakity 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]); Tue, 09 Nov 2010 11:38:03 +0000 (UTC) From a5460d2fe6294287c4e86cedde5ac0f47b6b0368 Mon Sep 17 00:00:00 2001 From: Zhangfei Gao Date: Tue, 9 Nov 2010 07:17:32 -0500 Subject: [PATCH] sdhci: remove SDHCI_QUIRK_FORCE_1_BIT_DATA SDHCI_QUIRK_FORCE_1_BIT_DATA only used for modify caps, which could be updated after sdhci_add_host Signed-off-by: Zhangfei Gao --- drivers/mmc/host/sdhci-of-core.c | 7 +++---- drivers/mmc/host/sdhci.c | 3 +-- include/linux/mmc/sdhci.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c index c51b711..620d5bf 100644 --- a/drivers/mmc/host/sdhci-of-core.c +++ b/drivers/mmc/host/sdhci-of-core.c @@ -157,10 +157,6 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev, if (of_get_property(np, "sdhci,auto-cmd12", NULL)) host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12; - - if (of_get_property(np, "sdhci,1-bit-only", NULL)) - host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; - if (sdhci_of_wp_inverted(np)) host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT; @@ -172,6 +168,9 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev, if (ret) goto err_add_host; + if (of_get_property(np, "sdhci,1-bit-only", NULL)) + host->mmc->caps &= ~(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA); + return 0; err_add_host: diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 154cbf8..8114bd3 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1858,8 +1858,7 @@ int sdhci_add_host(struct sdhci_host *host) mmc->f_max = host->max_clk; mmc->caps |= MMC_CAP_SDIO_IRQ; - if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA)) - mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; + mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; if (caps & SDHCI_CAN_DO_HISPD) mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 1fdc673..ede02a4 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -67,8 +67,6 @@ struct sdhci_host { #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) /* Controller cannot do multi-block transfers */ #define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21) -/* Controller can only handle 1-bit data transfers */ -#define SDHCI_QUIRK_FORCE_1_BIT_DATA (1<<22) /* Controller needs 10ms delay between applying power and clock */ #define SDHCI_QUIRK_DELAY_AFTER_POWER (1<<23) /* Controller uses SDCLK instead of TMCLK for data timeouts */ -- 1.7.0.4