Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp240531ybi; Wed, 29 May 2019 20:26:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjM9fruHXZSKeW92Qxz3K9n+fWnv7BmGRYUmdYspJm9NDDXg7DOy26XnwVeOgU2KcTGo3Z X-Received: by 2002:a63:35c8:: with SMTP id c191mr1636790pga.171.1559186819528; Wed, 29 May 2019 20:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559186819; cv=none; d=google.com; s=arc-20160816; b=UGcSape7plYTjlLqcbEGK494r17QZ2Fzj8LNCiGE81IgkjsCEFhoIcIgU/jp7Cck5e dRElWxrjwrfvOuTww9WaclV6GVPWxhpxWW8hd/9eqgiQO8MwTT60EgRMrkiykBde7RgG qQwM5c57tH64qqLZYUKrjPr20D/KZzu6cKrayrDmJDW5RgUk68cpEnWAFyh/wj8cdltN ITerH5uoOU3QprVN2cc3hcmvyV2BBDxm3SXqAahdACvHQ88gUFSVPJxi/VqPoIaU/l2r sf6xPkSO1TgXQ+ZpgXZfWT3fuIqTKMDPjyiD8N1RYpl2xY1GOCn87X82VCUztL361CpX CdOg== 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=wWB1SKgAF/ho+PlrEZXUv+g4CgLNdGAx5NCbmW7u4hs=; b=HukffZoptpOK3FE8TgxPBLyr+3HRH4Lza/JgGzza3wbHPXkUTu3euqhko1wga7Vpb7 VUB6AC2m6avBQ351sn0xFLykwyYXMnT0/Eomee9fp0udyouuobDlUVS0MJe3quJgUYc2 q6BzlZlDISIIyDHepLXP066Dm5DbFDJTWqKTDaPjz2yCwBcEmjfTxrSLj7oqeksPsj1m 3w+MVXUTb0dzz6uNJU2VZV4w5UU/chj+ExU4W5s3xeCpMG4DleQ7+n2dmJPMmHfMAN0b OEShFJt+HVDrIHYtqXrj3EaTyC5TZ+TtUIxg8vO68dxmYCrb/lkFGRL7DOjILUV/K1Go ysYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PLzam1nt; 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 h5si1611603pjk.68.2019.05.29.20.26.42; Wed, 29 May 2019 20:26:59 -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=PLzam1nt; 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 S1733083AbfE3DXl (ORCPT + 99 others); Wed, 29 May 2019 23:23:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:47300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730267AbfE3DR3 (ORCPT ); Wed, 29 May 2019 23:17:29 -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 D27B0246CC; Thu, 30 May 2019 03:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186248; bh=wUuPyAX2ppJJU0VJUP2I/prKq02WHLRGr4uP8I5EG4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PLzam1ntjS0BpvfiYHSD5Ts5Ntq0oaaFF1bDzfU0W7z6wF9EH001iCttbnaUgxECv 6LgfN4yreqt/f25B5/BJU7kTifST8AQDfAAg3vXOXGPcoq6Jl5/OYUENk2j3cOvMh2 NtD9adkCvtVN1NKlfWhGLQaGl/7oVI5kQymPfC24= 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 166/276] mmc: sdhci-of-esdhc: add erratum A-009204 support Date: Wed, 29 May 2019 20:05:24 -0700 Message-Id: <20190530030535.804146226@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 5dd195522562542bc6ebe6e7bd47890d8b7ca93c ] In the event of that any data error (like, IRQSTAT[DCE]) occurs during an eSDHC data transaction where DMA is used for data transfer to/from the system memory, setting the SYSCTL[RSTD] register may cause a system hang. If software sets the register SYSCTL[RSTD] to 1 for error recovery while DMA transferring is not complete, eSDHC may hang the system bus. This happens because the software register SYSCTL[RSTD] resets the DMA engine without waiting for the completion of pending system transactions. This erratum is to fix this 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index b2199d621b8c5..e63d22fb99edf 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -643,6 +643,9 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask) sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); + if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) + mdelay(5); + if (mask & SDHCI_RESET_ALL) { val = sdhci_readl(host, ESDHC_TBCTL); val &= ~ESDHC_TB_EN; -- 2.20.1