From patchwork Mon Aug 15 08:31:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 9282445 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 7FFDF600CB for ; Tue, 16 Aug 2016 00:55:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7153C28EC5 for ; Tue, 16 Aug 2016 00:55:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65D8628ED3; Tue, 16 Aug 2016 00:55:50 +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 54AE528EC5 for ; Tue, 16 Aug 2016 00:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752408AbcHPAzs (ORCPT ); Mon, 15 Aug 2016 20:55:48 -0400 Received: from mail-db5eur01on0066.outbound.protection.outlook.com ([104.47.2.66]:31822 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751244AbcHPAzq (ORCPT ); Mon, 15 Aug 2016 20:55:46 -0400 X-Greylist: delayed 50975 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Aug 2016 20:55:46 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=nN/AAYyWehosvPNVcFNjj1EPASm4TdT/YI9NbPDcU74=; b=QFn/70R8tw5GrU8eQwtnn7T1uVrK5brqHFX4uX1FZAwBExbxh3nDzOmjNPaZNSl7FIF+gM/Lj1FoK2axOhR+mhbKz0kKS4tQwgwPwfE4ZFm/msEbnn0w8UxUskVXePMUGqDTO4VIHqWIgTBAG9/Qp3z/+PoY4q1q5NFJfq+oL5c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=haibo.chen@nxp.com; Received: from b51421-server.ap.freescale.net (199.59.225.131) by DB6PR0401MB2327.eurprd04.prod.outlook.com (10.168.54.152) 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:26:06 +0000 From: Haibo Chen To: , , , CC: Subject: [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count Date: Mon, 15 Aug 2016 16:31:33 +0800 Message-ID: <1471249893-32345-1-git-send-email-haibo.chen@nxp.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [199.59.225.131] X-ClientProxiedBy: KL1PR06CA0030.apcprd06.prod.outlook.com (10.165.15.168) To DB6PR0401MB2327.eurprd04.prod.outlook.com (10.168.54.152) X-MS-Office365-Filtering-Correlation-Id: 139262d3-d5c0-4c14-b552-08d3c4e5cfc7 X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2327; 2:dO94r1eV2IOj93vqpnIppY56m3f9Ekr9hTKUmbzVlKdkCktCNaxXehas3mX/2lnfhZkyKX51JfbACQbY+v7sXMPsw681ZeGJ3UTjLCe0npCS4Ev0umZWP9Fw26ukHXn0ZG0D1RetbGETSkCx2+GkJW41bHyJgmYQRXE9CJftNCGFEfb/Oxg4NBYPlfiol2ni; 3:3ZyUOTbuBCqG7GfArR8ecJZmpzF0LSotDpjhwquPFGtIyiFdS9BukYuPqIu8VJR8cqGnJCMNjkKQBD4Otlkp1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u1czf/uZwukod0z2jLBWtPEX7eQrN9Kjtt7iGZx+HQrUWqexmXYzzisdzud1dAgR/94slx8wenu7yAtpk5b7ssLWCaxqBeoR4jNWlXbGIVSQmXSaR1TA2TdMjDP6BRmIP5qWPkFaoXXRFmHg5gs1Qbhetf5ZkG3h+nJVvBQYsKrBIYk6sB40Q0bOVQa/YrQVDJ0qFFgPW6qcf9K26RnX5y8y1w913fwHWG066EJqFjajL 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)(3002001)(10201501046)(6055026); SRVR:DB6PR0401MB2327; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0401MB2327; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2327; 4:xmG3/S7fl8aKxgNDJpxXXDYNM+ENNLbUar8azo2njCsP0xnOzTOlRWudD45BLjto74wymHx/VAcJOeGmngEukNyC150ZC3WOOJ/73LRLkBImmMlJH4aTJ/m2cWq9Sfr0w2V70nYrclqic5I3kRQHs1Ye6BPlWmZFmSMgXUVtDd3jwzOysWBAmi0etp8mboGIziv9iIQpjP7oUKdrvDFDXbuwwqzjDHIPc4Gx/nXIEaz9FcdkIwHbz73DK+WjiFTmSFfNkpcgRfyRlLSMg13NEDBYBHbXkuV1iC30gij3SHhryCQWlAr1BpzKTrClrSkKuZmWEq8to4NKJVRj2T5bUcj+Hd5Zx6+5Ak9BdSUoEq1fJbDTvRtCLF5QXM5mMlVlcWuN/t4YDLr14av2xk8jCx2ZwcV4o0aMExbeRDK0C9Jx+U7hh7ma+YjWWw3xIZhgBiw46VMoIjwogGJimaiNQg== X-Forefront-PRVS: 0035B15214 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(42186005)(66066001)(106356001)(36756003)(229853001)(189998001)(7846002)(77096005)(81156014)(8676002)(81166006)(7736002)(105586002)(47776003)(50226002)(5003940100001)(6116002)(5001770100001)(97736004)(2906002)(33646002)(305945005)(230783001)(68736007)(50466002)(2201001)(50986999)(92566002)(4326007)(586003)(3846002)(48376002)(101416001)(19580395003)(19580405001)(86362001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0401MB2327; H:b51421-server.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DB6PR0401MB2327; 23:rGQ4IS9d/gYaDn3aQWlek/42GJUd6kF5hCXpxMk?= =?us-ascii?Q?4G5B4PWqDn3jQfvIJ+wf6c13pQ09yGphztjy0K0OBDqmBKCszEJgJ83t4E/H?= =?us-ascii?Q?+5MujmFgzoEgFEUUiD2G6egNcWUKJ12gHbdzKJZJ8cljkuCkCvhpAeUaNCjU?= =?us-ascii?Q?8iIyF81vG3p+MZDq+RLsOHWgmW9HZn+eqPmE9C4h+4ik+w97q/8yzaVfJWZo?= =?us-ascii?Q?dSZ2r6YeqBzJ2f99Bd6up4kNnIOtN9qICTTBjQVMvFgd1/ULZe/6yB2N27IX?= =?us-ascii?Q?tSfQQ57QjTy9kxTcO3yafF2LL+968VdBdNUw/GDMk2fpHFNEWwuFp9Hmu/rW?= =?us-ascii?Q?cdsHmHHcLQ4N5J2whFPuczfW8wwVv1VjVg5n8ItZtfyTy4/L5jHKf2oitigP?= =?us-ascii?Q?PNwv8Vh8q8IOtF+RQtzZsqqtOXgikMnTD4SRtNZ6BMCyUWL7w0p7Ji/60eTF?= =?us-ascii?Q?rqcR2482f8luDP72LHcD2Gc6hIIvV4r3dRYo4WEbAFnzymMG+hhdBSDkMzTl?= =?us-ascii?Q?VCrr/muB/yxx0rfSegrWbO+3BWbu9Bf6YaDEng57Dq/OCQUnH3w3O4QXscGS?= =?us-ascii?Q?Oab64B2pXBxLJiEZK1lwql7QQ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XUf4TPUodHwG0/+1fMw5s+ih1sAoOEBZUYVoNZR25GQqdhhC92uwhb8LA==; 24:c7DjAhBOmYUbEtnJleOjTppp9wRCP0z5RwFmY6WNVhrCMbLX1SNFjOc1oBHkJ1Rr/2U0amF8FBYZd/IOs7GtNDx9TB22/oYzMYSWs8oOmkA=; 7:TF7nmKcVuDHwpikueqmxd+588NS5Tgc+mJFi26r1fo9wx4jEjmoX++jGLXdFxtwAWi8+wISO8EFQnZa+t3pyUmpuKPxucN00ebd5vUlX2lPO0sCtYXwu6WBpEDCJuGGul8Mz4WrLX1lxvbIniBZKyeDmj30/wS3IuTihsATU904A/NKA5dFUFpJfGiGSqJTqkhLbr+SvYp7RSYzct2EjNA4ohdT8zC6p+6/6oq21hW0n8rZsuaU2yhPUuwlXNMHj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2016 08:26:06.0764 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2327 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 i.MX USDHC Reference Manual has a mistake, for the register SYS_CTRL, the DTOCV(bit 19~16) means the data timeout counter value. When DTOCV is set to 0xF, it means SDCLK << 29, not SDCLK << 28. Signed-off-by: Haibo Chen Acked-by: Dong Aisheng Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 437c448..ea7d086 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -929,7 +929,7 @@ static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host); - return esdhc_is_usdhc(imx_data) ? 1 << 28 : 1 << 27; + return esdhc_is_usdhc(imx_data) ? 1 << 29 : 1 << 27; } static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)