From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F89AC072B1 for ; Thu, 30 May 2019 04:49:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 590E925D04 for ; Thu, 30 May 2019 04:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559191798; bh=8keJriZsw9Y8ar9fdjBf2O42zokZWeaUYjGcDFk/UWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kinYw3hGU0/JDW31sto5h1NstltH5t/2BJQa9TxeADlGvSBsH0toqztNT57+pEXAY xStQ+QPBbsqr7xxZ4XHYrB//XAzGBUPaTg/ctzxW1bb/u0uyVDSxg3SQdhlwn3aNby zv4m9QPYWm0Lbqn074ZffTSSv7VNYlw4R7L03WAA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388863AbfE3Et5 (ORCPT ); Thu, 30 May 2019 00:49:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:49916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfE3DLI (ORCPT ); Wed, 29 May 2019 23:11:08 -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 A7CBB244A0; Thu, 30 May 2019 03:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559185867; bh=8keJriZsw9Y8ar9fdjBf2O42zokZWeaUYjGcDFk/UWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZVrtnM9EOfn9ZAwdhrWNeXK3K1L/NxD/x43r5WThBxXsxYbqSfu9zL5tc6+WL0u3d 4FYrYzDo5x/UfqxKXIGs2n6YMRii0w6+7pjuwq1cvgfz8tzZB2qPesb4KpCS2/tWAs exKFphSH7jAcOovF3VBMIytT92PK/Amn1ShZ19Qg= 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 5.1 207/405] mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support Date: Wed, 29 May 2019 20:03:25 -0700 Message-Id: <20190530030551.606966990@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030540.291644921@linuxfoundation.org> References: <20190530030540.291644921@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 4fc4d2c7643c5..7e0eae8dafae0 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1077,8 +1077,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