Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp964560imb; Fri, 1 Mar 2019 21:25:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwq1iQSmmHMuFW54UJWkjqUPvPBKhnI/ZNtPHgRtUWHQAoy08gyJfSZjYOODfAmIPysrHgF X-Received: by 2002:a17:902:9a0b:: with SMTP id v11mr9264853plp.194.1551504318886; Fri, 01 Mar 2019 21:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551504318; cv=none; d=google.com; s=arc-20160816; b=WtsyBBqNBRzStOOsQeGTETLaBmEL/bnIWpknmZIdiiFI9xTWDgHBLp0CHQ8UgjOgk5 b0C0aSswX47/aczHK5KWRuQDzPMe1cRF86DMpK5qW5Fv5+D/qpTGZGHfmJtlnD1R4FEC 6sZ+rq7ly3LI0XMKCwehOeY/S8bVRDou/eeTjDJO3WDDT495NnbTwtdOzRS297gf8xDB jYGBo3Vt93q0bbGOFibLztkDmQkw4NTPDCopEJ4TuHyOg9AiCcDFrsfzkjMJ6aG76u97 +o9IQ7eCEPtj7eahooKX18EhyLOCzC8T/L5C5/TUFCipJi9EE7/hJ7IYP71fn8N7gc4s zzDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=1B+N7uE+HVqMozipQL4sMXKkt7WcnsWeT4TSmtt5PYo=; b=q9A7I4dQDDes00AdKnmyf6ckYpo5MTn6Ys2F6yZt/O9d0kQn8LbfKLBQc8fjaBwDqI VGCxSefAs2mK1d8wnuj0xCq9cv1vsuqaeYUdOX8jvAUz/ntLRw8YpeShtsshWw4NUhhn yBwTDnJ6dFExl55gP2Bj7hpYoroUJrj/OqAiwv0Nv/1ARvIAmJ98gwgkOFSCyTGZSs95 K+FOrOcAozrQ1RHxw+ebUMQZ+RZNTTAXXWCdStgkRIqDtLC8yoi5TgL3LQDN+T5hflng gXQTzL4Kgom6piYaRfd8uMiLsrAkYCPEFAa+JWrjRoF10Obz6aY61aH1Tm1kCN5Ka+R1 1SNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=VZTRqa9s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si18483605pld.152.2019.03.01.21.25.03; Fri, 01 Mar 2019 21:25:18 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=VZTRqa9s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726049AbfCBFUz (ORCPT + 99 others); Sat, 2 Mar 2019 00:20:55 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:15121 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727985AbfCBFUx (ORCPT ); Sat, 2 Mar 2019 00:20:53 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 01 Mar 2019 21:20:51 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Fri, 01 Mar 2019 21:20:52 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Fri, 01 Mar 2019 21:20:52 -0800 Received: from HQMAIL106.nvidia.com (172.18.146.12) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 2 Mar 2019 05:20:52 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Sat, 2 Mar 2019 05:20:51 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.172.134]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 01 Mar 2019 21:20:51 -0800 From: Sowjanya Komatineni To: , , , , CC: , , , , , , , Sowjanya Komatineni Subject: [PATCH V1 08/11] mmc: tegra: add Tegra186 WAR for CQE Date: Fri, 1 Mar 2019 21:20:22 -0800 Message-ID: <1551504025-3541-8-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551504025-3541-1-git-send-email-skomatineni@nvidia.com> References: <1551504025-3541-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1551504051; bh=1B+N7uE+HVqMozipQL4sMXKkt7WcnsWeT4TSmtt5PYo=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=VZTRqa9sAIkv/NVS8AO5Ymz3T2BA+H6Z0Xc+Z7oQRHovXrOr3cE3LWAOvu0sckU/q Cg9CZd4K3Byo4o5OT3E2oMIYOx57fScP+sP+rqQQjgWEIQxxFbH2mTjQYVsKIHf3pP IS9VgXdNwfDBDt4SHhmOdYemgbnqxCTm5KY+Ia4YiyGB6/qogLBMkK4b+Jj8nLE34h 4vSUzMoedLOQGxlhI1GLx+OE0L15ImqV7xOUctn45GSYM0QoqJLYVmzLgwP7DKeqGR gobFcTsgi8oQxa49N9k+51gcMCqSn6X08dW959cCx/itYchCVofaCYTsp0gPoIGFd5 pfT6ltka32Wkw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tegra186 design has a known bug where CQE does not generated task complete interrupt for data transfer tasks issued after DCMD task with R1b response type and results in timeout. SW WAR is to set CMD_TIMING to 1 in task descriptor for DCMDs with R1b response type. This bug and SW WAR is applicable only for Tegra186 and not for Tegra194. This patch adds this WAR to Tegra186. Signed-off-by: Sowjanya Komatineni --- drivers/mmc/host/sdhci-tegra.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 2086e0eced88..2b63626dc2fa 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -116,6 +116,7 @@ struct sdhci_tegra_soc_data { u32 nvquirks; u8 min_tap_delay; u8 max_tap_delay; + u32 cqequirks; }; /* Magic pull up and pull down pad calibration offsets */ @@ -1354,6 +1355,7 @@ static const struct sdhci_tegra_soc_data soc_data_tegra186 = { NVQUIRK_ENABLE_SDR104, .min_tap_delay = 84, .max_tap_delay = 136, + .cqequirks = CQHCI_QUIRK_CMD_TIMING_R1B_DCMD, }; static const struct sdhci_tegra_soc_data soc_data_tegra194 = { @@ -1383,6 +1385,7 @@ static int sdhci_tegra_add_host(struct sdhci_host *host) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host); + const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data; struct cqhci_host *cq_host; bool dma64; int ret; @@ -1407,6 +1410,7 @@ static int sdhci_tegra_add_host(struct sdhci_host *host) cq_host->mmio = host->ioaddr + SDHCI_TEGRA_CQE_BASE_ADDR; cq_host->ops = &sdhci_tegra_cqhci_ops; + cq_host->quirks = soc_data->cqequirks; dma64 = host->flags & SDHCI_USE_64_BIT_DMA; if (dma64) -- 2.7.4