From patchwork Mon Aug 15 08:19:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 9281001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 53E8160780 for ; Mon, 15 Aug 2016 13:45:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45A4928C1C for ; Mon, 15 Aug 2016 13:45:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A41828C1F; Mon, 15 Aug 2016 13:45:36 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 B783228C1C for ; Mon, 15 Aug 2016 13:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752802AbcHONpe (ORCPT ); Mon, 15 Aug 2016 09:45:34 -0400 Received: from mail-eopbgr40049.outbound.protection.outlook.com ([40.107.4.49]:63422 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752488AbcHONpd (ORCPT ); Mon, 15 Aug 2016 09:45:33 -0400 X-Greylist: delayed 13609 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Aug 2016 09:45:33 EDT 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; bh=feNojESteCxPrIj20VofRMJqOSvuPTqXBCL86XL+Cfw=; b=AfBRQZSY8VBZAy2+vW2j6L+PjRZrbSwvwKKVyH7d8zbb+DRT4rgwX0R0XPkFO7nSgyIQYzOA2oyhwYJQienpCg0nGAulsfmCJqIbnofOOYmBF2Xab5UnpoPAnpDxKhiZDeA4l2B+lJ+9pz4oe3dhDH9BdaCYn+qcuxlK+VHj4t0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=haibo.chen@nxp.com; Received: from b51421-server.ap.freescale.net (192.158.241.86) by AM4PR0401MB2324.eurprd04.prod.outlook.com (10.165.45.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.5; Mon, 15 Aug 2016 08:14:36 +0000 From: Haibo Chen To: , , , CC: Subject: [PATCH] mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV Date: Mon, 15 Aug 2016 16:19:38 +0800 Message-ID: <1471249178-32204-1-git-send-email-haibo.chen@nxp.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [192.158.241.86] X-ClientProxiedBy: HK2PR04CA0017.apcprd04.prod.outlook.com (10.162.205.155) To AM4PR0401MB2324.eurprd04.prod.outlook.com (10.165.45.23) X-MS-Office365-Filtering-Correlation-Id: 1a35efd4-3083-4c3d-15d8-08d3c4e4345e X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2324; 2:tC66f8xh0QZv3BmamhPpSUWfGb/NFkaXCZGqOiryaWWur3qIWL+cbgGlQL1oUIOfjsWisNl+cLc7vjpOD1Po0HXp0Y8XwBzEBta/GISyIv4XYVfFd5lwVoiz2TnqkOplUgNzAGtu+2eNPx8EyvFLmUgZbOBnC68nHrQe5f1um0DlcA5URgNst0O1IGk8c3+6; 3:uhAAXZyMCrnB4FFgvajploQqu2Mzkb6YIBlADGWj96YtsWTokDP8/oFJgp/Anr4xKp3T/PAjOr8UNYpPpXhU/hdJLXhzXe11XghQfTKbZH3T3kigdL5JVKbzBB52KLZa X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM4PR0401MB2324; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2324; 25:oUMlMcR88VyQDriXVTY62lpfCGzBYZHh6mNyrhVxCshYIZodcZodcW4Rsu6a5oTYe59JOUZGnjGv7mdWdtgGQjiXj7Q+9uqphW3gXaxVizFD4LkElXF8m/PFVDqWiQmMSIXZjOGwLzPYw0NWtosK3ZgUoGakQBovov9K9EuRlqpWOf4s3cO50W/UleYoG961bT6ku+cTojsv6qVpBYjEcSr3seZRjAQNs/ySsStIqyZnmU96lbnMY4L2DISkmSSTz5GxO4JeSYHobPcL5ZUHctIph9RZP1V5DrfHigjYFY6lmjlS606xt8C6PYbWzOwFM3dlU6kmzmlvWXnL361J0OTYzncIrHI1P7zuGGNRnvACr/ojisBHnshS4vvayo1wRh2VdRwV/jP6UG7IIKEKMrswVLvz9SZFjR6rGIasVRbg3idaTmt7uckI7qcp/yfI2wRCVmO03VpkAX5/G1SsmcJmi9GVZH58m4CV1+yXCmyELGbP8Mq6Nfivfc3U+sTbkKs9QXIiJf58168m/ubewga8YOH2q6Zht2FacymRZT7Q4eO3wBR+URbNHelsrB6kfRTU5W2TCuU1ENptd0LsmtS2Lz6LVMenMXXLgvNVvRVSowK+3VEqxw6T/lu0sg9QWhIo8x5DTKtPZfmt2qjHelOxhM33Pjgov+G8zHkYx1oKmYwR5ReCg3ByAxTUaWGw; 31:Fgidl2P0RnJl8fq+wCoEjw6eXVwpQDPwD5acMy+Q47YfJj+ergh8cg0mAFE/czEbK/pipGQacc4MVcAGIjn6DFA7J3dxurPEqFdGLdFHwKRZfX52uYG5nEpkEj5uPnahhgepHBEdY/ifF0aCi41wBmn9khJa4ViYQ2hor9woRsRFJpqVgsilQy8hbN8pbIj8hAcDwNz3LQX71uQfIDJRuGX7WiAt3qr1YZW wWYiT5M4= X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2324; 20:r6ZFkNtElaM+eViSYFitDxQe64Ogeyj3glEK0Mo7ucYmJn7Dd7nwv6jPFiqjlbhPEsxBfS7CoOiEEOECFpSsZoJcxWM/WUrlHtytcPFYfsFp+WB6L1U0EE93MwABF64kd3YNdIV9A8W0jQeHJVBNBKxxet27RtODyC/pDHi3gzyHBz8HljAzDDWcEZVvdf6jqHLYy/TdZVD5eiivZI+ARuzcWkMkJcMp84BsrifVsh7hstPFdyusZBtPbuDogw15h50uC+IL8U8YwkSohLpxX7DAF/XUACvHi8Z1QXIUDw2WZEnHr7MD61X96YA31t3b/2dZDWtFP90lRuiG+11QagQ+hla6Qt2QykyVZ2SStSJpW0Ose4YFsdHesTyEKsPzKA6hn1iqeBxszX2hI8Ro+UDuNV/E4P+hn0xozA0xiPkBw83ppauFr0iEcKwydjPt3PxPeq6roJkF/qOASjeDcyIcaRQZAUIeMa1dZ089OifiMJ7psRNsrXhGOHHx3CrR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:AM4PR0401MB2324; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0401MB2324; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2324; 4:bRIm10y7baEp2m6UMSE0hqYiESKYEcmFzCfxEAb84BlI5RhjTCMXVgMOTzfYYbhRZOacpA1ycHq23E293OdsVzwD1/OOaEFKjMDktrWC4InicLWHog1x5XyCaMxDbTWIiWdZ16tfwLw8quGVVZMF9zEQSXP6VJ16Cd+lwCq4O23pTjNJkdLZbSbx6AkRTVOvoXh/6aiAwqy7OZh7pK6cLt9n1azGX/Xoyp0JL03bDLk8JAFzatSe7V8Z0fgUHTExMbBvG51dYkKETyojRZ66kqP3wKVG5xrURq3WEGKv/+oFW6/BOkBB1wTNjUr30R0DbE0nnhsiaC1QsDT9acgpIRunDTRxZOeLNEqvI28ToeGJDgm7NXy97EAZe2dUac4ZxMPxJJw/OLVTS6vJ9v1SO/mY2dJr3y/QQ7nSpY54eskf/EixN82prAfGk4f0QkNX/PBVl6mwudpyz8uGAutWSg== X-Forefront-PRVS: 0035B15214 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(50466002)(4326007)(2201001)(48376002)(50226002)(19580405001)(92566002)(586003)(19580395003)(2906002)(33646002)(3846002)(6116002)(7736002)(5003940100001)(5001770100001)(8676002)(305945005)(47776003)(7846002)(81166006)(189998001)(81156014)(97736004)(77096005)(66066001)(68736007)(50986999)(101416001)(230783001)(229853001)(105586002)(42186005)(36756003)(106356001)(86362001)(575784001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0401MB2324; H:b51421-server.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR0401MB2324; 23:FxtmUSykh1BUNKDoyFe+A62YzB3R4DGWeFSIj4C?= =?us-ascii?Q?0rK9tMLsnsVveIjjjukTmXvXwHhupye0ngxOOCD77UxGXj3gWyzDCyONK/bb?= =?us-ascii?Q?97QN2aEDP1Pkg568YIKOv+ckxorjRqIZu71I/+s56/qe3AtvTRT2RQe8t8gm?= =?us-ascii?Q?T2KhXdSkLQbOa3X8LD+rYfBLPpwVtBnKLHuIVJLr+DmRwEzWgAFp7oP3+Vzg?= =?us-ascii?Q?HUI5uZJjp/jD1Q+fWzWh44CuY0hhXtuEPBkfcD/1tQvrLjZagSKrg6kFYWPy?= =?us-ascii?Q?6LF2rh6UvDMQNJttkRjspckTwMXK8KKm7zBC7PUYwLBWynVHUAxtqLo+Z1U+?= =?us-ascii?Q?aHQPrtByBcWx318HDJvXvGjhj69E9cI+GEWyPZvzOfhgpQy00HypjFp+zPNe?= =?us-ascii?Q?0COXhvUGFW5hKr5V6tVRKP8escOXVwapT2voxJ29FxoSTJVBWMyGFbub0ee5?= =?us-ascii?Q?12T5Y7dSX7bFfaN/5ahhgZXdi91czGrlkm7sNrAWGVTkYJxbRkY2Arv80EP0?= =?us-ascii?Q?uBDWu2ggPE7nrqlvDYnHEJ5sdAa1w33A+juVsHJet6TZqhrkrDnkDVgbeG6D?= =?us-ascii?Q?fgaLIFP7QW4FRT1GaTBZlZXcTMWf+rN+U5Bm7CxuYcWknnko1AS6hLn5rjX3?= =?us-ascii?Q?ee/v5+7Duq1kZuxZ2UDOx61GIstVEgdrAritlaP9QKciPJ4ypIkOCrkQ6eR/?= =?us-ascii?Q?MmH41+8ITLv/K4jS0APcVOe92FyfTmiNcKF7ecD6l/roEbwAQcA4+1iylGqu?= =?us-ascii?Q?BLCGv+Pm7GMYVkGiqZYI7Bt/pcydFCwqTFH//3Adc6pk0av+VNkBfWwjbpZ6?= =?us-ascii?Q?pHUTIYnNhSvZn8s0Qeob6fcf6pixxiBNJt0/7HsnpE7lViuydAYUwfnXxAuD?= =?us-ascii?Q?iyiblXkrS+cKvYplsieEvIFHSCDwAMs9brcD2+ZV+rDcyGRM1YKhA0/nccz5?= =?us-ascii?Q?Ziud9MwAaILds53btJg3aDOENimVUCcBI7uU83omp+n8Ksy21npx4eL25FgL?= =?us-ascii?Q?ibaNDvBb53WR7I/Wpm92xITAn4RzeljBaC4TuOzhqckzLaG+TFEypO9ubuvn?= =?us-ascii?Q?8trb1DZpjMZyQAa4shTYuBxg4oOXpHzWLoF1AerYWArPl0lfCsg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2324; 6:x8Rn6laN5SbEzhGZ41zxjaGI+GfAUscQRaESkS7osiW/MVu0MeAe10M1W8Ygpy4r0sxj8LcsLdvYMNuoCk5KLVrFvrY8hKfZjKVafARV3WqnUvIzaaJn8ioe4t175vM44u1ZqERY7zrIoE02bpcOB+0YdAqRj/gN18Q7QtT1htxbi8i7DpzRn9m+rdsQU8NFmyk9k7EFSmJZ0iw63vVIdm64w74HtlUTyOTZXa7rITDRKhNfT51Yoj4cD7dRS8HhKgrZ710o8PHsUpBhXxJo6eqXPGQgAqENtOeaZn9+alWuJLVpoN4YhYW6ZlYmjuy/ngoYXGe3Ah+0tfER/QhORg==; 5:OXH+u7q14ZTUF7Qm/AuuM2ks/3pC7+9BHzmKFudYbh3SjPKVU6CmgfDz7TPsozkMU7dYr4mN963621i2cABGUphT7mnitK0YqB2NEbho4uhF0ulXwK4g+/HQh9Rgwr0ztQncLqk/2oS/Zjh58ldikw==; 24:CSNlZA7b65JIY2Ast5kKTQj2uYC8/OW7eKNWY7vf23+0MTaLfmaPu2GIpIauh2TtGSJjNn7HA3NyYOD8dZkIkBZDbrDECXHyXyyM9ZT8g0A=; 7:2CFMAyDFGDFLwg7iKANQwddYKx//bUWENtfOk8TrtW3d3VUbUfiFppMXfQ882YEX2pxq0l4JzX8jBNUkmTu5mYOvPA0b0IX+agi0X9yMVyO8mG1yHsth42EcN76aJHST+CgeI2glkRGuRJhE57H3QLoUc2Yu+rKvLtUPIIfTef4Uh/JfO3pSAPsa/fqBpm8jITEnfsJZLfPUNsk6jmdIn2FgkiRwEbVFTofawKN8AWLhNMqN2vMJ4+Q6H7QVfNAP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2016 08:14:36.7003 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0401MB2324 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 Now, when call esdhc_set_timeout() to set the data timeout counter value, IPP_RST_N(bit 23) is wrongly affected. This patch add a mask to avoid this. Signed-off-by: Haibo Chen Acked-by: Dong Aisheng Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-esdhc-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 99e0b33..437c448 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -31,6 +31,7 @@ #include "sdhci-pltfm.h" #include "sdhci-esdhc.h" +#define ESDHC_SYS_CTRL_DTOCV_MASK 0x0f #define ESDHC_CTRL_D3CD 0x08 #define ESDHC_BURST_LEN_EN_INCR (1 << 27) /* VENDOR SPEC register */ @@ -937,7 +938,8 @@ static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd) struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host); /* use maximum timeout counter */ - sdhci_writeb(host, esdhc_is_usdhc(imx_data) ? 0xF : 0xE, + esdhc_clrset_le(host, ESDHC_SYS_CTRL_DTOCV_MASK, + esdhc_is_usdhc(imx_data) ? 0xF : 0xE, SDHCI_TIMEOUT_CONTROL); }