Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp274297ybi; Wed, 29 May 2019 21:09:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSbEAMmxC0rmCvzHdd+5Y9ruBdVFerwXvtuELOg6JZQcIy04MnE2uW/yPzLhhfVRNAz5Kb X-Received: by 2002:a17:90a:2268:: with SMTP id c95mr1614370pje.8.1559189370869; Wed, 29 May 2019 21:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189370; cv=none; d=google.com; s=arc-20160816; b=XX8cNww1CZSjoB5nrLGxjgBc46sCFsJHXrYCtJCQXZCaPG5G6PW31O59ewK2uSdq6Q NZQLvVU8p8rTiDlP8QLBE8D0fshfB1pYkdvy41MYjBM846Lt5kmyoS6vI9roOv1cUeYq RD1j1vFYKMq3sFIpRSGL5xiGmqp8pgv8dqPk7tUpV+LGfErxfKuvyUegQCAdFQYnLqcL KVD/OqAF2Wga1YG+rK69DylchXE+wa25qqi/2AyB/HuqvuFD5wFgJsoATFKUkMU/7Sct g/nq604C6t+/kBaFYGwqASpa7/iwfy4o+PUW1qenhcbh2VdfgJ60bjViXNqzdStoaQUw UWiA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tB6szIJwPFP0kiMIYzp6wPzk2CKEMP/sqHZHlpt6jjo=; b=JJqqpmQWywFkZyzuXAvHeSGJL/yuuoqKUDLritELTY6paFTPIt8j6buBPMXt3jYY0f SCf7G7SLoOmQGFJ3MRrqfVvAuYSLRZKMuxN27HbDJc+czyGb4z4VuQ1k5Lu+dT/S5whb o+qzgj4E9XVK6yGEOAwJObMSbbM1PDFON5viFznVShoDVffzEwFzd/f1loaTebDoYTwY wk68RVCK9EihlXuDxYpHblw1qcVvLDarNqESi8cgLcZxdxSpC/yXRC0DWF9pN0hoXUdO HgYCqmbTBPITPa2jW9ZMeH7mClT9zfshQczseL239py68u/mN7Kxk/nHrSa6SVTNM3sE cC0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qsIFZmH5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j184si2029410pgc.345.2019.05.29.21.09.14; Wed, 29 May 2019 21:09:30 -0700 (PDT) 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=@kernel.org header.s=default header.b=qsIFZmH5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbfE3EHJ (ORCPT + 99 others); Thu, 30 May 2019 00:07:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:47328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731133AbfE3DRa (ORCPT ); Wed, 29 May 2019 23:17:30 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F8FE24027; Thu, 30 May 2019 03:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186249; bh=8dupTE69iXTuiR/Dve+SGnSpw1wvW4cREdHwZWJ7Xcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qsIFZmH5gBinGxMhqrr0Dao2EuIre1BE45KBnsOFXjMBWWpCwEp8mlsUopSJsLnE6 dqTqWB/1OJGx73gmdGiGXHE6yJqg4Mlmnq9LzxjeK6lMEGlXlaK8IuY/kTGTt99r0u l34PrvQ5p5+pyk9xSA3wQIjgQs1Yh+2zb5OUtjzU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yinbo Zhu , Adrian Hunter , Ulf Hansson , Sasha Levin Subject: [PATCH 4.19 167/276] mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support Date: Wed, 29 May 2019 20:05:25 -0700 Message-Id: <20190530030535.858249716@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 05cb6b2a66fa7837211a060878e91be5eb10cb07 ] eSDHC-A001: The data timeout counter (SYSCTL[DTOCV]) is not reliable for DTOCV values 0x4(2^17 SD clock), 0x8(2^21 SD clock), and 0xC(2^25 SD clock). The data timeout counter can count from 2^13–2^27, but for values 2^17, 2^21, and 2^25, the timeout counter counts for only 2^13 SD clocks. A-008358: The data timeout counter value loaded into the timeout counter is less than expected and can result into early timeout error in case of eSDHC data transactions. The table below shows the expected vs actual timeout period for different values of SYSCTL[DTOCV]: these two erratum has the same quirk to control it, and set SDHCI_QUIRK_RESET_AFTER_REQUEST to fix above issue. Signed-off-by: Yinbo Zhu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-of-esdhc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index e63d22fb99edf..e5c598ae5f244 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -920,8 +920,10 @@ static int sdhci_esdhc_probe(struct platform_device *pdev) if (esdhc->vendor_ver > VENDOR_V_22) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; - if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) + if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) { host->quirks2 |= SDHCI_QUIRK_RESET_AFTER_REQUEST; + host->quirks2 |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; + } if (of_device_is_compatible(np, "fsl,p5040-esdhc") || of_device_is_compatible(np, "fsl,p5020-esdhc") || -- 2.20.1