Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1909671imu; Thu, 24 Jan 2019 04:11:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN6G9+iPz1o12OKhLFHY2kZgmeLeBy0X3NAVsN4w8sLzqyFBemiLiV4anL7fQ+ihsg/uxpi0 X-Received: by 2002:a17:902:e18d:: with SMTP id cd13mr6337564plb.262.1548331897702; Thu, 24 Jan 2019 04:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548331897; cv=none; d=google.com; s=arc-20160816; b=VK8VOswvG87C7nFWUF9r7o/Sd2mANw4FzFXeMgjq4EXiYSlooVX+NEbhub7TZx3Nc0 uWjtQ7ySkbvzAMJGWcKkYN0Pl0ZRaH48bNwFUrjEfyQz9RjAdiM9b2jRbgLz4gAhZ5C9 yy11ukLmN7+9LKrkbUByINpWH343mKLNNS3YJ/jYFWVxOnZhO5d1YKPP8Ssu82nORM/8 wwHs8H8BK0+BukkS0A9TpV+TreDrYBLfBSBPhOigj3ySP8/M7nrMNABr3qbYC3+F9CSJ RmdfpQlzmeXcDxMKO1+bmR3KZX8r0/kwCfAloF4j+1ioRsC7yxzLFZelNp00E+AumSgs BfaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=hxp+x+bZo51BPUcMdGzBwfSfACJ4ZdzYWmPEPoGUp7c=; b=TMS0PsOHRokmlRCGD8ujx/orf9WjsOnYHJlpz3gK1HCplU76hazid789m320X3q7QA STX4w4w8ig6sRuKbKxb+DTxsUdY9N/QgABw7mrKlswn60Z/k7QjszWrcpdyS3+AfkHy9 p+6a7I48jlK1VAGaGT13nBoHC8g39SNUObivHfn4g4OVNtr6I0kUU18PdQx9sgcctx3F kxNOFXiY7x+EunbKVv3uWQBj0JpSVS5Q7btYr3nOFH0kEar9TdLp602ah2GowU0+Ctz/ UDiPg9at3e60XG6bEuEmbmR6InLL8S2gdad0AhXDo7UcRZmOme1YDcFOjTwazgiI4KgS zy3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si4637719plk.77.2019.01.24.04.11.17; Thu, 24 Jan 2019 04:11:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727775AbfAXMKX (ORCPT + 99 others); Thu, 24 Jan 2019 07:10:23 -0500 Received: from mga18.intel.com ([134.134.136.126]:45407 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727616AbfAXMKX (ORCPT ); Thu, 24 Jan 2019 07:10:23 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 04:10:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,516,1539673200"; d="scan'208";a="140932427" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.56]) ([10.237.72.56]) by fmsmga001.fm.intel.com with ESMTP; 24 Jan 2019 04:10:19 -0800 Subject: Re: [PATCH 4/7] mmc: sdhci: Add quirk for disabling DTO during erase command To: Faiz Abbas , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mmc@vger.kernel.org Cc: zhang.chunyan@linaro.org, kishon@ti.com, mark.rutland@arm.com, robh+dt@kernel.org, ulf.hansson@linaro.org References: <20190111110851.6805-1-faiz_abbas@ti.com> <20190111110851.6805-5-faiz_abbas@ti.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <8c5875db-016c-c416-7356-d7a26d8d2a0e@intel.com> Date: Thu, 24 Jan 2019 14:08:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190111110851.6805-5-faiz_abbas@ti.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/19 1:08 PM, Faiz Abbas wrote: > Some controllers might prematurely issue a data timeout during an erase > command. Add a quirk to disable the interrupt when an erase command is > issued. I might have already asked this, but would it be possible to use the existing SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk? > > Signed-off-by: Faiz Abbas > --- > drivers/mmc/host/sdhci.c | 8 ++++++++ > drivers/mmc/host/sdhci.h | 2 ++ > 2 files changed, 10 insertions(+) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 4a9044c06e21..cfd716aee552 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -1560,6 +1560,14 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) > /* Initially, a command has no error */ > cmd->error = 0; > > + if (cmd->opcode == MMC_ERASE && > + (host->quirks2 & SDHCI_QUIRK2_DISABLE_DTO_FOR_ERASE)) { > + mask = sdhci_readl(host, SDHCI_INT_ENABLE); > + mask &= ~SDHCI_INT_DATA_TIMEOUT; > + sdhci_writel(host, mask, SDHCI_INT_ENABLE); > + sdhci_writel(host, mask, SDHCI_SIGNAL_ENABLE); > + } > + > if ((host->quirks2 & SDHCI_QUIRK2_STOP_WITH_TC) && > cmd->opcode == MMC_STOP_TRANSMISSION) > cmd->flags |= MMC_RSP_BUSY; > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h > index 7a52823ebef4..d0c6d4fe5371 100644 > --- a/drivers/mmc/host/sdhci.h > +++ b/drivers/mmc/host/sdhci.h > @@ -479,6 +479,8 @@ struct sdhci_host { > * block count. > */ > #define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18) > +/* Controller needs to disable DTO for erase command */ > +#define SDHCI_QUIRK2_DISABLE_DTO_FOR_ERASE (1<<19) > > int irq; /* Device IRQ */ > void __iomem *ioaddr; /* Mapped address */ >