From patchwork Tue Aug 15 02:16:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 9900783 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 3ECB9602BA for ; Tue, 15 Aug 2017 02:33:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2759628738 for ; Tue, 15 Aug 2017 02:33:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BDF32874B; Tue, 15 Aug 2017 02:33:40 +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.9 required=2.0 tests=BAYES_00,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 724BA28738 for ; Tue, 15 Aug 2017 02:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbdHOCdi (ORCPT ); Mon, 14 Aug 2017 22:33:38 -0400 Received: from mail-by2nam01on0056.outbound.protection.outlook.com ([104.47.34.56]:2362 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753152AbdHOCdh (ORCPT ); Mon, 14 Aug 2017 22:33:37 -0400 Received: from DM5PR03CA0048.namprd03.prod.outlook.com (2603:10b6:4:3b::37) by SN2PR03MB2271.namprd03.prod.outlook.com (2603:10b6:804:d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Tue, 15 Aug 2017 02:33:36 +0000 Received: from BY2FFO11FD042.protection.gbl (2a01:111:f400:7c0c::164) by DM5PR03CA0048.outlook.office365.com (2603:10b6:4:3b::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21 via Frontend Transport; Tue, 15 Aug 2017 02:33:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1304.16 via Frontend Transport; Tue, 15 Aug 2017 02:33:35 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v7F2XWb8009321; Mon, 14 Aug 2017 19:33:32 -0700 From: Yangbo Lu To: , , Adrian Hunter CC: Xiaobo Xie , Yangbo Lu Subject: [v2] mmc: sdhci: fix SDHCI_QUIRK_NO_HISPD_BIT handling Date: Tue, 15 Aug 2017 10:16:47 +0800 Message-ID: <1502763407-49116-1-git-send-email-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131472380156087814; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(4326008)(5003940100001)(6666003)(68736007)(8656003)(5660300001)(97736004)(81156014)(81166006)(2906002)(104016004)(8676002)(69596002)(47776003)(50466002)(106466001)(305945005)(8936002)(356003)(105606002)(189998001)(48376002)(33646002)(36756003)(50226002)(50986999)(85426001)(86362001)(626005)(498600001)(77096006)(54906002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2271; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2FFO11FD042; 1:PmdyyXmm4VzE1nDW+Qs9BS/B0Exxw9OleYLUlCgZ25?= =?us-ascii?Q?/XRisX0+cxyxM0DoCgNm+ToHOGIBdbOn4HmuyasuY6bwe1uQupLo+LExZp2Q?= =?us-ascii?Q?JyDpXFXPfo8LES8oHTv3MB2MoAkAAUtKdHwVgHIPnugAEuAs+nTQAilo+YwN?= =?us-ascii?Q?zGeOAs6tga/UeJLl2gjWTaHDcVwwp2lOW/Eq+I1hnQPUTF5fjeHTm+Ql6X1l?= =?us-ascii?Q?lUm35YXgtVpHvoj1J6HcBkcqx3imbdhM/JpYtrtY8fpLzUXuZiufHZ8XsAoO?= =?us-ascii?Q?deDcw4Ex6tl8IxJN/C/dkqDPgMZ5sk9e/2noIr75DolaSbkTwlm/QZEU/aEs?= =?us-ascii?Q?tHDLj0Plc283fOE4O7Qfk25qORi/pKku/hSVUEIRny50vse3CqjW3MBeoWic?= =?us-ascii?Q?vhZCdj2DnvPiGE6YxGhrtYvhGVOug/hhys2wIQBzBZ0AtAiT0tJuEvl9hjWZ?= =?us-ascii?Q?+0zIf6dXXnPnSZABk3ge2snfjrESe+IJ8YzgmpDhUpb7V5DUQPnfkAV9ZmY1?= =?us-ascii?Q?pE/f6HNDdSRE3dJS84E7exBddBnz4fWGKV55MPqTOM/WB0L8ubbP6HvZ53Y4?= =?us-ascii?Q?EfMNgrXtNwrpSQVdZZ/26bUg1eU0HaxBZ+NbtjJtozZPQ6vF5p0e5jkPy+0d?= =?us-ascii?Q?X2YwWjUhGza8JJBlgkePW5tKXCtAdfu7kWMaPJs2RIbDkHAls7U1JITEHzze?= =?us-ascii?Q?FnX+lPos4z9TTBDCvp0M7AyNcKYuWSdF+UQ0PndUwuHsB0LFlM9YfDCBvq/G?= =?us-ascii?Q?WYDE48l9PNXzuy3Sx9Z6yrN91BIxzoj8SWSJdqXjPqKyNEQD7i7Tf+Z8Gq3y?= =?us-ascii?Q?loveTCzk7ClS57YXYcQdP4f0pZ3hgbrV/BCOEHro1W+eNuDs51r5KvBGLVWv?= =?us-ascii?Q?1pE6zVtHjHkVNj3HBOKueEbYYyEEfYHhZK6QyQbg1EzuCiM29RDeKroyVb7s?= =?us-ascii?Q?jlWk2baL8Yq7wOlk6e5BL8QVrxQjTbjNvHJZitPsfU7dYwY+MbKLZFlsG4i4?= =?us-ascii?Q?LnrvT5CyDK2+1DuqF6cCUg?= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 06b0b62f-13be-47a1-8e06-08d4e3860771 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN2PR03MB2271; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2271; 3:ViJbDo7/TYjtP65AOulC2/arvkW5PYC3SQ5d4Klf4Q0veE4kLOgboQbLE0WN6DmUkF3+VufTb0V9X8yIYP6Kq9qWDSm74+PVSXcbN6hhlU170vFAqB/Dorkh97g1Rc/0VfcaBYDF38s1I3g4jzUdgjn4/MYock/VdtTBOZoxDjZBR+E2X5KgGXf/MW1WsDq6C12E8O2tngPdjOdsx9U+BMRgE6TNy358HqN6Z7RUgVwiKVywmwk4sbwL+24dnv3adv9eTh9DMNQDFIIGxxPsK85nmtpklMP7JpsDpRpzMX9CDXGqc7hqf/uLsGCsaGVYNmJk5iwpAZw32U4SFyvBdA==; 25:glUpBI4LAMCOoSFGsm99e38rOJ9x0PwQTolVOXic72c4XWORRyYRHM5KyuuRW8QPGPd6Q3AM22g2xGiNrafbLDL/vyYepDqfTLR6spsZDeIf4zIBej6YDVI/C4TXfCHiHryvpfvYHCT39Jcy10fCySiDh+dI0lC83WKizfh/mC+HJ5BXB03fBJySOAXPKHqn+u5YdHYsi2yP5zN26gRmjnYzJgIZrON5+NRJXdkK5/LvTVODCqYnorME0sqquB/q9GveI6OdgbYQ6bLiHwsbjUnM0f3jyUhAvZUZFMywrrEGpQY7gTYOF3VCzKrqU7Y1xHXGi/ekUBoUBpY2rLb+rA==; 31:CVNxGQCxgYeE5M6hjNqJnXnrCKfA+q4BasVbpf8/dssF3qvCAbiDklGJC/mPesXJHfc04edvTcVThiw+dBnhm8UWtaj6FBa8BaCvu4MDjEQz0Ts4AKYNfC/DoCRkHgZt4r8xJJZG2NqsNd//O/1tqTLLzufWi8xHENaCMOfEneyctrA0ypjzA5LHlmZdDc8babs5/J5V9KBl1pwmS34O1Tem7JPzyh3nKWwDS353/P0= X-MS-TrafficTypeDiagnostic: SN2PR03MB2271: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(5005006)(13016025)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123559100)(20161123556025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2271; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2271; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2271; 4:AbVJ53c4c9DIWw2bBBptwXIyLlYim2cfS8Lw5ZKwukP+UmILNOnXHNDNgOaTfvD3ttCp9yJcLcyeOwQ7M2T/73Jch11QSom1/9Za+/aNW3RuzH26DqlelESUeeXl9M6k0uIos6rW63vsKWb2hgzINUTguuhmmmZBSj6dEPLuoFnuxUrU3GIiKlwcPmRwu3UN8sDIty/RG3uhPmGz5uDN6BCNwNDRoSBtKLErkGd8ZUgfJGj8iEUkGONfpBuaZanhFKfgzR5ClKgiJxE60idNAEXPq1mjXdxSC9kpIySA7GKk/ufanbXaYB0VxovT8eEBytqC1feKoPUQ5ui3YoTRKA== X-Forefront-PRVS: 04004D94E2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2271; 23:3uXquaEofkhU2bENpfCeNDFiit50Oj7Sw0Q9Pmu6H?= =?us-ascii?Q?InAQmio2JTArNVhvEyYi7uFmY/uq9cxyukq1tOJ9i31Ji2uJraj1ddIsb5gR?= =?us-ascii?Q?pRajyF790TQ/Pefd0vF6xvk/kPZzF11wQJdrbjYLWshKXm4xwTtEUg/0sSvG?= =?us-ascii?Q?IQGHq9bqeU+Mw3k9jLU5pcJY/75SfihZUilW9+hFg6QX7a83eDUUs1oN/raw?= =?us-ascii?Q?44pMlr6DF3o3wkwGcQHY/l3p79f1cEYr4biI3FzVD4aVEW4c3OO1g5OBrGIq?= =?us-ascii?Q?9ZDAi2yTXna2HV3eWc1B6JCymsUJr6U03kUu3Ln3iKKVI64J8DoLFSTatluD?= =?us-ascii?Q?3nlHoLsBqjM9IAcMEADg3+kMeeqzQlO23N51wr1JwWJWSUKjZVfbo/P8sG9r?= =?us-ascii?Q?tAe4gBlfAsyIVOcGby6Zfwsjr710I8EU9m6aG2bKwCSk5XILw5BzXVZeaaYu?= =?us-ascii?Q?fVn+c2GNzHq2oYdiTjL27NOgFs3GkJJuc8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wPNu4TdKsKhFdKiOUx7+OALSsg==; 5:2bN+G/cDudoF632LEUfvyw1nLex1Za9rKsCR2H9lFyvU7s7LbURjlgHNoNTde4CsnuEIEP7GUJuTpsVPfE4q3g92cwfk43Dljf/9N0dfeKQghqfEBp/PsLKoHuwjN7WrxSq04P/HbXMmn8SfrUjYYg==; 24:Ha513NQRxZySId08xSVtou/7TD8YJfTeNUsRJVkRhteT5YB9iVrEs3uKz1xsOFD6uCMYX7/xWWW83RIqO8rv7Ffa8DXh/pEBuXbLzb5igcM=; 7:GDEfG+rjcHkUVWQqBWVOKr00RMHsbpM3uwr+5v/v8NGHxf5tnKTzvIOGKouBsu/tSc4d17y9otDsCct2xVzYVXZb9/qt0y/I/ajw2uOWYu9/GB5qzITWZEd9oBJtekX9chxj1488P0b1BWcMpXxtnzi4nikSVDW+Mro9Lwwy1OMGCcphAG4LpA8zDgtiUdDKt1B1AjpR6mUQ6dB+nE5yh+KPWqPvyMKMjYtuCUh7r5w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2017 02:33:35.4995 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2271 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 SD controller with SDHCI_QUIRK_NO_HISPD_BIT quirk probably use high speed enable bit for other purpose. So this bit shouldn't be changed for high speed enabling for this type of SD controller. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter --- Changes for v2: - Removed duplicate perenthesis. - Added "Acked-by: Adrian Hunter". --- drivers/mmc/host/sdhci.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index a1ad2dd..315bded 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1641,19 +1641,20 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); - if ((ios->timing == MMC_TIMING_SD_HS || - ios->timing == MMC_TIMING_MMC_HS || - ios->timing == MMC_TIMING_MMC_HS400 || - ios->timing == MMC_TIMING_MMC_HS200 || - ios->timing == MMC_TIMING_MMC_DDR52 || - ios->timing == MMC_TIMING_UHS_SDR50 || - ios->timing == MMC_TIMING_UHS_SDR104 || - ios->timing == MMC_TIMING_UHS_DDR50 || - ios->timing == MMC_TIMING_UHS_SDR25) - && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) - ctrl |= SDHCI_CTRL_HISPD; - else - ctrl &= ~SDHCI_CTRL_HISPD; + if (!(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) { + if (ios->timing == MMC_TIMING_SD_HS || + ios->timing == MMC_TIMING_MMC_HS || + ios->timing == MMC_TIMING_MMC_HS400 || + ios->timing == MMC_TIMING_MMC_HS200 || + ios->timing == MMC_TIMING_MMC_DDR52 || + ios->timing == MMC_TIMING_UHS_SDR50 || + ios->timing == MMC_TIMING_UHS_SDR104 || + ios->timing == MMC_TIMING_UHS_DDR50 || + ios->timing == MMC_TIMING_UHS_SDR25) + ctrl |= SDHCI_CTRL_HISPD; + else + ctrl &= ~SDHCI_CTRL_HISPD; + } if (host->version >= SDHCI_SPEC_300) { u16 clk, ctrl_2;