From patchwork Tue Nov 30 06:42:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 366111 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 oAU6oLiN024866 for ; Tue, 30 Nov 2010 06:50:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753618Ab0K3GuU (ORCPT ); Tue, 30 Nov 2010 01:50:20 -0500 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:44480 "HELO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752484Ab0K3GuU convert rfc822-to-8bit (ORCPT ); Tue, 30 Nov 2010 01:50:20 -0500 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKTPSeo0CIsvEFFYs+OycghAV8Zx45zDd/@postini.com; Mon, 29 Nov 2010 22:50:20 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Mon, 29 Nov 2010 22:46:51 -0800 From: Philip Rakity To: Jaehoon Chung , "linux-mmc@vger.kernel.org" CC: Chris Ball , kyungmin Park , Andrew Morton , "matt@console-pimps.org" Date: Mon, 29 Nov 2010 22:42:11 -0800 Subject: RE: [RFC Patch] SDHCI: add quirk for data timeout value when card busy. Thread-Topic: [RFC Patch] SDHCI: add quirk for data timeout value when card busy. Thread-Index: AcuQVoeMNO1LbGARSH61VW20RASKuwAAy/Fs Message-ID: <43E4817426ED174AA81263BCECB4351D13200C545A@sc-vexch3.marvell.com> References: <4CF4961C.5020606@samsung.com> In-Reply-To: <4CF4961C.5020606@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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, 30 Nov 2010 06:50:21 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 782c0ee..3b93d97 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -655,8 +655,12 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) WARN_ON(host->data); - if (data == NULL) + if (data == NULL) { + if ((host->quirks & SDHCI_QUIRK_SET_DATA_TIMEOUT_VAL) && + (host->cmd->flags & MMC_RSP_BUSY)) + sdhci_writel(host, 0xE, SDHCI_TIMEOUT_CONTROL); return; + } /* Sanity checks */ BUG_ON(data->blksz * data->blocks > 524288); diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 1fdc673..315ff49 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -83,7 +83,8 @@ struct sdhci_host { #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28) /* Controller doesn't have HISPD bit field in HI-SPEED SD card */ #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29) - +/* Controller need set data timeout value when card is busy */ +#define SDHCI_QUIRK_SET_DATA_TIMEOUT_VAL (1<<30) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */