From patchwork Thu Feb 28 08:01:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 10832617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3ED1139A for ; Thu, 28 Feb 2019 08:01:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9764F27165 for ; Thu, 28 Feb 2019 08:01:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AFA02E0E4; Thu, 28 Feb 2019 08:01:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFDF227165 for ; Thu, 28 Feb 2019 08:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731154AbfB1IBV (ORCPT ); Thu, 28 Feb 2019 03:01:21 -0500 Received: from mail-eopbgr150075.outbound.protection.outlook.com ([40.107.15.75]:57666 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730399AbfB1IBU (ORCPT ); Thu, 28 Feb 2019 03:01:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KeKuRyv0ccYy1QzabgsOK1i5eB7shVYtTSNo+PrpZXw=; b=Vm7bpOvIUf/EvHyVWZq86cURrSoS+YUCG8AJGfRRQA23EWbnmeSFY8OuGpVZR8XOCPrtjAIB81xdyjKAPj0pxoujbwfoX/DINblkJYJUqVMa7lmEZKUnprSrBZ1ddJMKDz05NSiS5XGoXeui92BLvyVv59zNnS4jW9pBtur47D0= Received: from VI1PR04MB5040.eurprd04.prod.outlook.com (20.177.50.97) by VI1PR04MB5549.eurprd04.prod.outlook.com (20.178.122.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.18; Thu, 28 Feb 2019 08:01:15 +0000 Received: from VI1PR04MB5040.eurprd04.prod.outlook.com ([fe80::6c6c:b113:a6c1:dcb4]) by VI1PR04MB5040.eurprd04.prod.outlook.com ([fe80::6c6c:b113:a6c1:dcb4%5]) with mapi id 15.20.1643.022; Thu, 28 Feb 2019 08:01:15 +0000 From: BOUGH CHEN To: "adrian.hunter@intel.com" , "ulf.hansson@linaro.org" , Aisheng Dong CC: "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "linux-mmc@vger.kernel.org" , "stable@vger.kernel.org" , BOUGH CHEN Subject: [PATCH] mmc: sdhci-esdhc-imx: correct the fix of ERR004536 Thread-Topic: [PATCH] mmc: sdhci-esdhc-imx: correct the fix of ERR004536 Thread-Index: AQHUzzvGZZd6kFSU6UyFmHEBouXG2A== Date: Thu, 28 Feb 2019 08:01:14 +0000 Message-ID: <20190228080859.32520-1-haibo.chen@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-clientproxiedby: HK0PR03CA0035.apcprd03.prod.outlook.com (2603:1096:203:2f::23) To VI1PR04MB5040.eurprd04.prod.outlook.com (2603:10a6:803:59::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=haibo.chen@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 70ed1daf-1dd4-4abc-f7a6-08d69d52e94e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB5549; x-ms-traffictypediagnostic: VI1PR04MB5549: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BVI1PR04MB5549=3B23=3A0x?= =?iso-8859-1?q?45IM7A8c1n/1JUiWNUKoJxvL6qRTCijCnzghg6MelD8kBo9M6HP0UAJRF/KQ?= =?iso-8859-1?q?FkGk++8FIDVncXmGNQlnh75NA7LcaDZ3od/2sHQZyoK8W8RGrlfVot5n5yy1?= =?iso-8859-1?q?eKhk86UK92TLHKN42w6mskKKhVWkgIQPVGfkylNM0IBYcdIThX9PyFp3TMYH?= =?iso-8859-1?q?eCtvi5NirX/BPHJA5QUOEkdkFi+99EbhD6SeVF3jWIEv/ZGFvoY0lvcuvHX4?= =?iso-8859-1?q?jj9s5OogL+kJeW41wjj0AsJRihPtHSnDG6Y69nBVkF1tBygNoh2PKf6MFkwP?= =?iso-8859-1?q?eeBrJaQnU848BOq4DEuTt4ZW3Kf6+VNgrnSwMGaLPXIkDf49z6VavTl3ceYs?= =?iso-8859-1?q?TH8+ONJv0isZlvChI+wVUqFTsec4jUZJ7TU8h5vGZnonJ/O4wkoX4Cabw6oa?= =?iso-8859-1?q?p6egKam+mGLl9A8gOhmxA86op5afwYDs01LKWpx5HSBj6UrmFqaSPgxcg/d+?= =?iso-8859-1?q?Yhd2YdSOWfrvpJE4QCC5KQqBC3qtPiNEl0C4sjFQ30EjWchzf4W2Zx+CByEX?= =?iso-8859-1?q?InEpSw0l4wbN9H6QrKTPuIEp6Y9nQm1pJ/vz/wz/0t1fWD37F91M+bZBKFHo?= =?iso-8859-1?q?GCqNCrS7rgYxRthF8/1pXOI0mIVTXEFCW+ppnsUzc1osv/BSq+yaoO2SQddg?= =?iso-8859-1?q?DWQV8thZgC2HPQ0Lsfser69iZvWLHnN3brLCdk6rCyC/Pfse1auhMkQBPf4X?= =?iso-8859-1?q?rh7apBYUxCPiGZ1PFYxEUqoZ7sPfKt5ASCS/5OHHzCq2Sbf/jDldNG1Wov54?= =?iso-8859-1?q?H+WUgS4PTlsfgIZFl86OVewaI4xeCbZyQYpli8szQPqDneg9y3skQOclOQFO?= =?iso-8859-1?q?JgHECjqo0RZuHt/+jLKDCaZRp3OAA550JvDC3CNG8T0NRKY+N6I8fE/vxhth?= =?iso-8859-1?q?FdukCmW5zSMIiXsITZ0rn9VEc3ThgJextneX7ZV+Cy14egNapww1Q7JSbe7+?= =?iso-8859-1?q?bIrdhGycqG2xF/TEo/J2w0yYPR8jOsFUCEB3hdgp4gKI4OndV4mX2mRy4GcJ?= =?iso-8859-1?q?A2jJNLORFK1Kz2xtN87FdSfL0J3kyHinlEtK5tcKJbnK540oBkq6zzAjecyw?= =?iso-8859-1?q?miFWigAfWOrCNU+4XQ6UvkGcarpto15nQsAkli/QbLbz+jwgnDkVKFS3Qe2e?= =?iso-8859-1?q?JhdYHmQ9xKp29xGPldNGgoaG6hlLnhyk/PATqtL60Mas+fMjdzvF77flg0sG?= =?iso-8859-1?q?APqiGzhR83kZk6v+io/SyAvscM0KM/UiWdkC2Pxyik1V/isLWkpIbrOrg=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(39860400002)(376002)(396003)(366004)(199004)(189003)(51234002)(14454004)(81166006)(52116002)(68736007)(53346004)(26005)(36756003)(2906002)(305945005)(316002)(99286004)(1076003)(2501003)(53936002)(97736004)(106356001)(6116002)(5660300002)(66066001)(6506007)(102836004)(386003)(3846002)(81156014)(54906003)(486006)(4326008)(7736002)(2616005)(186003)(6636002)(6486002)(86362001)(6436002)(25786009)(105586002)(478600001)(71200400001)(50226002)(8936002)(6512007)(71190400001)(110136005)(14444005)(256004)(8676002)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB5549;H:VI1PR04MB5040.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: XdGyqEMQBor5O5TAXTKULr34E2mTKpRd6JnykDDPW9GZSaJrKDW4O88XrDrNLLka1ZXolI2uF/w7Xh3Lp38tzZOoOkl+kc9gUwY/zXfCzYH0oFUpbKt/YibsifRkh61lXgd3liT1A7XR715+TaqLtDNw8vT2DpkBcEGUjnecqpnbeqAw5zpFECcx2lI7hs+gtNhJFbwFJybsEMdWt3lrojhYxtPcHHzXmnZ8epPwd5fotC23kyG9NZ9fKqse1NEF+9KWwYQcMkGOUsGiOdQ1C85Myy8VRrmdRH35rL8IFtKAA8RQPifEL+O3yRcdk1DXeuVcR52RdIbR+gWD7xNwk0X0shB15HUy0Vl4UBoyrRQ3ZzT/RNIkfKuiEGpKwy5Qis1ApI3v7YYTpmTu0ndukyaLVTvyOSEssGLBFAGQts8= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70ed1daf-1dd4-4abc-f7a6-08d69d52e94e X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 08:01:11.0843 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5549 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 18094430d6b5 ("mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix") involve the fix of ERR004536, but the fix is incorrect. Double confirm with IC, need to clear the bit 7 of register 0x6c rather than set this bit 7. Here is the definition of bit 7 of 0x6c: 0: enable the new IC fix for ERR004536 1: do not use the IC fix, keep the same as before Due to the reset value of this bit 7 is 0, ROM code and bootloader do not touch this bit 7, so here directly remove the operation of this bit 7, make sure the fix of ERR004536 can work. Find this issue on i.MX845s-evk board when enable CMDQ, and let system in heavy loading. root@imx8mmevk:~# dd if=/dev/mmcblk2 of=/dev/null bs=1M & root@imx8mmevk:~# memtester 1000M > /dev/zero & root@imx8mmevk:~# [ 139.897220] mmc2: cqhci: timeout for tag 16 [ 139.901417] mmc2: cqhci: ============ CQHCI REGISTER DUMP =========== [ 139.907862] mmc2: cqhci: Caps: 0x0000310a | Version: 0x00000510 [ 139.914311] mmc2: cqhci: Config: 0x00001001 | Control: 0x00000000 [ 139.920753] mmc2: cqhci: Int stat: 0x00000000 | Int enab: 0x00000006 [ 139.927193] mmc2: cqhci: Int sig: 0x00000006 | Int Coal: 0x00000000 [ 139.933634] mmc2: cqhci: TDL base: 0x7809c000 | TDL up32: 0x00000000 [ 139.940073] mmc2: cqhci: Doorbell: 0x00030000 | TCN: 0x00000000 [ 139.946518] mmc2: cqhci: Dev queue: 0x00010000 | Dev Pend: 0x00010000 [ 139.952967] mmc2: cqhci: Task clr: 0x00000000 | SSC1: 0x00011000 [ 139.959411] mmc2: cqhci: SSC2: 0x00000001 | DCMD rsp: 0x00000000 [ 139.965857] mmc2: cqhci: RED mask: 0xfdf9a080 | TERRI: 0x00000000 [ 139.972308] mmc2: cqhci: Resp idx: 0x0000002e | Resp arg: 0x00000900 [ 139.978761] mmc2: sdhci: ============ SDHCI REGISTER DUMP =========== [ 139.985214] mmc2: sdhci: Sys addr: 0xb2c19000 | Version: 0x00000002 [ 139.991669] mmc2: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000400 [ 139.998127] mmc2: sdhci: Argument: 0x40110400 | Trn mode: 0x00000033 [ 140.004618] mmc2: sdhci: Present: 0x01088a8f | Host ctl: 0x00000030 [ 140.011113] mmc2: sdhci: Power: 0x00000002 | Blk gap: 0x00000080 [ 140.017583] mmc2: sdhci: Wake-up: 0x00000008 | Clock: 0x0000000f [ 140.024039] mmc2: sdhci: Timeout: 0x0000008f | Int stat: 0x00000000 [ 140.030497] mmc2: sdhci: Int enab: 0x107f4000 | Sig enab: 0x107f4000 [ 140.036972] mmc2: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000502 [ 140.043426] mmc2: sdhci: Caps: 0x07eb0000 | Caps_1: 0x8000b407 [ 140.049867] mmc2: sdhci: Cmd: 0x00002c1a | Max curr: 0x00ffffff [ 140.056314] mmc2: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0xffffffff [ 140.062755] mmc2: sdhci: Resp[2]: 0x328f5903 | Resp[3]: 0x00d00f00 [ 140.069195] mmc2: sdhci: Host ctl2: 0x00000008 [ 140.073640] mmc2: sdhci: ADMA Err: 0x00000007 | ADMA Ptr: 0x7809c108 [ 140.080079] mmc2: sdhci: ============================================ [ 140.086662] mmc2: running CQE recovery Fixes commit 18094430d6b5 ("mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix") Signed-off-by: Haibo Chen Cc: stable@vger.kernel.org --- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 32ca3703b432..5ee7613c818f 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1171,12 +1171,6 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host) writel(readl(host->ioaddr + SDHCI_HOST_CONTROL) | ESDHC_BURST_LEN_EN_INCR, host->ioaddr + SDHCI_HOST_CONTROL); - /* - * erratum ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL - * TO1.1, it's harmless for MX6SL - */ - writel(readl(host->ioaddr + 0x6c) | BIT(7), - host->ioaddr + 0x6c); /* disable DLL_CTRL delay line settings */ writel(0x0, host->ioaddr + ESDHC_DLL_CTRL);