From patchwork Wed Aug 9 05:32:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 9889541 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 2CCBB60363 for ; Wed, 9 Aug 2017 05:49:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1133F28A2F for ; Wed, 9 Aug 2017 05:49:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FCBB28A31; Wed, 9 Aug 2017 05:49:30 +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 CA055289F1 for ; Wed, 9 Aug 2017 05:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360AbdHIFtZ (ORCPT ); Wed, 9 Aug 2017 01:49:25 -0400 Received: from mail-cys01nam02on0077.outbound.protection.outlook.com ([104.47.37.77]:51568 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752333AbdHIFtY (ORCPT ); Wed, 9 Aug 2017 01:49:24 -0400 Received: from MWHPR03CA0032.namprd03.prod.outlook.com (10.174.173.149) by BN6PR03MB3315.namprd03.prod.outlook.com (10.174.233.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Wed, 9 Aug 2017 05:49:22 +0000 Received: from BN1BFFO11FD030.protection.gbl (2a01:111:f400:7c10::1:167) by MWHPR03CA0032.outlook.office365.com (2603:10b6:301:3b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16 via Frontend Transport; Wed, 9 Aug 2017 05:49:21 +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 BN1BFFO11FD030.mail.protection.outlook.com (10.58.144.93) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1304.16 via Frontend Transport; Wed, 9 Aug 2017 05:49:20 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v795nHpZ024379; Tue, 8 Aug 2017 22:49:17 -0700 From: Yangbo Lu To: , , Adrian Hunter CC: Xiaobo Xie , Yangbo Lu Subject: [PATCH] mmc: sdhci: fix SDHCI_QUIRK_NO_HISPD_BIT handling Date: Wed, 9 Aug 2017 13:32:35 +0800 Message-ID: <1502256755-37752-1-git-send-email-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131467313604910427; (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)(39840400002)(39450400003)(39380400002)(39410400002)(39400400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(97736004)(8936002)(5003940100001)(8676002)(50466002)(68736007)(50986999)(47776003)(48376002)(8656003)(626005)(305945005)(81166006)(498600001)(356003)(85426001)(81156014)(189998001)(4326008)(38730400002)(6666003)(54906002)(36756003)(77096006)(104016004)(50226002)(33646002)(53936002)(86362001)(2906002)(69596002)(5660300001)(105606002)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB3315; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1BFFO11FD030; 1:LVUhn9YIJJkjQWR7hP2pL4JF1RPdIY/7wMNKj9aY2?= =?us-ascii?Q?o7c/kgnbC6tqbyEXZztxgtiwEX0e5HkrRtZ+2bpobP/DnnfA61671mleIM2Y?= =?us-ascii?Q?XiC2J1AgdAck08r88LS209qrRz8RWr3GuMenLEokYk3ZOlcZsP++4f2o7al7?= =?us-ascii?Q?kyPMEzFfL8YHrueIHs9dOHHAG3KdH4bfwYH4tmLyKOmhpS9VjFzeAQZCQNw3?= =?us-ascii?Q?LVKL2vScuirH7R+Ia5dc5YHQiP78GorD1k0kz+VRaVm6++6QLncawEYWmvTE?= =?us-ascii?Q?P08BDjiIi8pZ+r5mTZhOvTzqSJBFthd6MKeAw6rKd11D1ltNTkeMW7Gp4T6g?= =?us-ascii?Q?IfyhTTj04vn/R3CZbDFkaTc0Sb1PQH+hDHHf9l+C1G4P7f9KYiNPn+FpopM9?= =?us-ascii?Q?OJrvnhrtserjYFD0sTFbo+OcRm00Bh6ejlXAfDzOby3gozHDdUhT3LsmSASm?= =?us-ascii?Q?HI+OVlRUkot8CcYbNDkwsWTrXgUxuvNWTFJvIFZMqXP5Ru9i/Ipc0vuJJ74w?= =?us-ascii?Q?G9HcDlJfWBAecYknqACKree1ymDvS4YA9EJpm2AX743Namd53UINW8cc585G?= =?us-ascii?Q?abatfdZS9xLpHOhAkaAPw7yhb2r3VIAEsVzM+PDHjugDT4/iPAJ+1/ghGR1h?= =?us-ascii?Q?B5TVbAXbVfSlMCdWy09WGIG7C4c5fP9Hx4HpI/2emb859DapxviO+ROFGWFl?= =?us-ascii?Q?7Z9RbYZ4lmanrkjHdjsi+pmLi0neM0Tyypd1vCsLbMDHFSZpL/7Lv8Ew//my?= =?us-ascii?Q?Liqj/z9zWAzsUYtSTnEXRYkiBWtc2qb69hksu46aXTL4tS+hZoNKbVwfe+x6?= =?us-ascii?Q?ZvepKklyDMWLsPNrrIco8mYNmeMzBan7kR2mLxT7xr+YAo2vwXGRavoNYPta?= =?us-ascii?Q?HdyZJ2AZlcKb3s7LIS0ceqxQUQE4R9ILNTmQv4yzppECNFaB/RQzxZlbNBam?= =?us-ascii?Q?b71eIAmsX8pMXzrkeFuCbsyzGyOLkO7KhgHgDUKoXtfiTjRgqDQx+BC+dJAm?= =?us-ascii?Q?LQ8gLZHcb4UuYCmaX6ddVDb?= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5774faac-a5ed-433e-7bfb-08d4deea6173 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:BN6PR03MB3315; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB3315; 3:mJ3EmUqfPdqKQX0iZ5vuW15GnQPhXP4/9SVt3WqbukfwJB3Sle2bjMrbrbJZPeLCtHT+MI7Vj8dwahaOTL+VzdW6hceVAI2uVzGfQdm0k38Z7zx/TZjVklkkXeoWISbmJVfq1joMmDEQ9m876EY/2REJctus8S7w1d0w3dY9MOP3eo7d+Ij8GLVjfTY2UgNvh6ZjdLGLkt7/QMUTETOk4ZW7ZOsdXorCQdFFWH7rn/8gz1IfsgX0yfjoZUWpo7Xepw33LBzZoyg8oJqyS0/6tyn1uXUi8VTJnDRIvUuwS/sY/2bxTfC7KKJW2mj0IpauDgypDgwBAEQcKZmJtHYACw==; 25:lAD01Dio7fvRQSxpjwqodi+ncTsE0FLhE5rzeQv0BIkmKsR2DEBZh2KnWxwx1Ao/M7qon46Nc3T3cK0o3+h7EO/maqTaKiE5BK4C9dAQK6zcrlduYpe+pZcQJb1g1KEjmZ0YOlTvCwNYpNA14PiHCeMoNF4X+VkpQNJ4DLv/JtTmLLvRQ5iWK9+R1JjLeASbWIGu5liGIonnpFBoAiBZ934YEfdz6e+uSZhR2JynEh4/VYEmjdGf+R+jTQhDZ0Ew/9TzaXxIzcVILQt1ZX6HHdh1xW/B5WuFKseJKi/SKgghWZkEzwp4AxJaeTYkKwWIhUi0+Flw1IPxk3m+hYKbFA==; 31:n4IxHpU4XF0vpKcJs6NvFhI3cn0ULcU3VhD2yQLT5dW/sga0OV53bdYGOEUy5X6T8rveUZpTi5i3RjNIB/MYbuU9OILrv74zPNnvRz0yk9C/ibf/Ga5rhSLQSbcxNomy4lPiI5DwNNCBUxbY0c3RIyKT0UsoGF86vRTNH+GEJOX9MkzODWHfiJN4Xm22Z5vmCFhOzA6E5q+k2/KVjfcl17kpaKoUchY9RuCCviSCYQI= X-MS-TrafficTypeDiagnostic: BN6PR03MB3315: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(13018025)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123565025)(20161123561025)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB3315; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB3315; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB3315; 4:xQml/NeINtJe/dySpZikbNhbg75esiIFa3oknhfKdQYE7ElMJNhp4O00TIs+rt5ZlESx9kx+QmBiySZQZXVw8WC2HwgmKB3AaildT8vQpkrd8U+mQ+dgNkcmzZK0brVwcRAS0mXliiJ87Pph59Hg4juLK+ed5aB5HlR/cqt96nvzSB7kuJ0HI+8hVA0EWP9AncnKfgkO7aZAvlYy2D5tRqKlKFuNqUEa3TcYRKYUlP52AKnMeSHtUT1vQdGPfI/ejCpLob5WKUahlL7mDVa/Mex88mv3HKUponubfhjLTzo= X-Forefront-PRVS: 0394259C80 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB3315; 23:PqfS3nQKzh7/qITykT+4Zc5EaX1/EZruVVbB5F1yN?= =?us-ascii?Q?PSzPGqZtV+T9g+g/CVvO91rhEzYbWtU9IRfnPNC96IsmNfKiWwKiEa1Ag0vx?= =?us-ascii?Q?I+tg/NkEObIJvjckgz9E6bRH8Qkfjc4H5BjZgFA446GAp/RcVlfrIjttNtMY?= =?us-ascii?Q?9tVcVLyi2q4EFS/C7ja1irV4k700skUqgZUcsTPGG+S7AjqOqM98S2JMkRbJ?= =?us-ascii?Q?bawCozsxCNcUPwDaMGl8RIN6QIscjNJyWjyE8aR5p8j35FEGxVBdrZrvLZA0?= =?us-ascii?Q?Gk8niAS5QupS2VXRv3aM+rnGobH7PdLi8P7KmglBB/oXlWnnuMB7STJ0WCF1?= =?us-ascii?Q?EuLnZdc5NzRwsCL9aQHX/NP6Nu4OMy45Pt2wMR4O6xXwMKqHP6PiJaQL5XQm?= =?us-ascii?Q?iZrS9fdHhWxRaf55iJ02JYZ3DgyyclSZGqZidxMZ5EX36O9es1R0rRtX3Yp4?= =?us-ascii?Q?vQzTFtf7tTljW5YesrN8ADByR3gIlEeoX8JZt/8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Byi7OCx8q5Ph/5ip9gxhJishNFF/3gfWkpzcICXriGTgb4m1MOwH6AAvZ2MpduFrxyhvdaNDz4OfUl79mjeK1YmD3wEyPc/L8qxrkuH3S8oPEqtNLGKBqk8+gWhp3hXr5aWzyEAuSCWMfFmwyYoqx+XcTN4Zlvg7FKAoNH4zmJJGb5k1ItbTn14onBHxMvetHC07g==; 5:/7wxRKRBErH/5rawiBMuaoeRIVV4APKznJr+X++eZxZ08jqR3BgfRAMJ91FmJ3pMr7EXd1pNNG6eV5vREb/789ZL8mm/1HuuOOODak1lhJcOvN05eis32yzJMisJiNnDksgGS6bCvWnK4RvCN4A+9w==; 24:yyk7P9u5xYqIzxik4D5BpepBH+iwhcZ9uP2+GHx1eq69WFKBe8y02NrlNGTy//xx0CSTrpHGffvAp9R5xtM6NynABbSC/96a1EB1dFlY2xk=; 7:ceL2x9VnRRf+6fHBvpwa0YyD/QNAHy9Rv/UOuO9hesndX/p8vSjEypJwQADC0LkBpvqqrqvCkF+YRrM2p7MjuIF/yzPVPQyrkvYzMiE3DlcYUZqUc3wn/Zjnhtfhfl+xaqGtNRbvoUG03PcC0u0+Z8wS4UgSjgatDTFYPodMlF1+NoqXiPWdf+7BmnrZnCzA/hq8h9aymercTZRmmxgTwImqlFmeWF1vz8U7s+nZLP4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2017 05:49:20.2414 (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: BN6PR03MB3315 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 --- 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..25393b9 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;