From patchwork Thu Feb 24 14:18:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 587621 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 p1OEIjgr026969 for ; Thu, 24 Feb 2011 14:18:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044Ab1BXOSY (ORCPT ); Thu, 24 Feb 2011 09:18:24 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:61342 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755452Ab1BXOSV convert rfc822-to-8bit (ORCPT ); Thu, 24 Feb 2011 09:18:21 -0500 Received: by bwz15 with SMTP id 15so1043609bwz.19 for ; Thu, 24 Feb 2011 06:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=zrnGqueL3+B39VRVRTCjV0eAbUqmwr1y12BUB9xWLsc=; b=rW4M4/A0Qzn2SE+fHHZYPrKzh3vJWN1AAes4t+RTIKuPNbhO+RvRa7WeoSt0mr0lzg q3lGVaIaFjwb6Ey8k7JgpSnxFq4F3+qv/MHIv/it9Yir4arPXLfZwSxwMahSEwMc+uu5 GU/y9A9mHiXbWa6vQrL/qn82iC0lIzftMg0+Y= 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:content-transfer-encoding; b=QCiJpIj7Ef65pj+KnsjwAMgePC7rf82+KDQbRv2qSHo7QaDOYpGFXSymEQEzxaO13A qM/Yyqj+Tu9xufWQM6HOsE0P2wGclEa25EKVMjjy0EoaQRYNCZr3X5RUSk5kQAz2yt+3 7+LFPgwKuuoBpQ85mCM7EWjwOes6Ruew1Mpu4= MIME-Version: 1.0 Received: by 10.204.45.86 with SMTP id d22mr837693bkf.8.1298557099412; Thu, 24 Feb 2011 06:18:19 -0800 (PST) Received: by 10.204.118.65 with HTTP; Thu, 24 Feb 2011 06:18:19 -0800 (PST) In-Reply-To: <20110224111935.GB7169@intel.com> References: <20110224111935.GB7169@intel.com> Date: Thu, 24 Feb 2011 23:18:19 +0900 Message-ID: Subject: Re: [PATCH 1/1]mmc: set timeout for SDHCI host before sending busy cmd From: Jae hoon Chung To: Chuanxiao Dong Cc: linux-mmc@vger.kernel.org, cjb@laptop.org, linux-kernel@vger.kernel.org, arnd@arndb.de, Kyungmin Park 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Feb 2011 14:18:45 +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 */