From patchwork Fri Apr 15 17:29:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 8854201 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F3C2FBF440 for ; Fri, 15 Apr 2016 17:52:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2782320211 for ; Fri, 15 Apr 2016 17:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A14F2021A for ; Fri, 15 Apr 2016 17:52:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750709AbcDORwZ (ORCPT ); Fri, 15 Apr 2016 13:52:25 -0400 Received: from mail-bn1bon0091.outbound.protection.outlook.com ([157.56.111.91]:47616 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750820AbcDORwY (ORCPT ); Fri, 15 Apr 2016 13:52:24 -0400 X-Greylist: delayed 913 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Apr 2016 13:52:24 EDT Received: from CH1PR03CA004.namprd03.prod.outlook.com (10.255.156.149) by BN3PR0301MB1217.namprd03.prod.outlook.com (10.161.207.17) with Microsoft SMTP Server (TLS) id 15.1.453.26; Fri, 15 Apr 2016 17:37:28 +0000 Received: from BN1BFFO11FD034.protection.gbl (10.255.156.132) by CH1PR03CA004.outlook.office365.com (10.255.156.149) with Microsoft SMTP Server (TLS) id 15.1.466.19 via Frontend Transport; Fri, 15 Apr 2016 17:37:27 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none 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 BN1BFFO11FD034.mail.protection.outlook.com (10.58.144.97) with Microsoft SMTP Server (TLS) id 15.1.453.6 via Frontend Transport; Fri, 15 Apr 2016 17:37:27 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u3FHb2HI019919; Fri, 15 Apr 2016 10:37:24 -0700 From: Dong Aisheng To: CC: , , , , , , , Subject: [PATCH 07/23] mmc: sdhci: check SDHCI_QUIRK2_NO_1_8_V when do voltage switch Date: Sat, 16 Apr 2016 01:29:31 +0800 Message-ID: <1460741387-23815-8-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> References: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131052154478080731; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(105606002)(81166005)(106466001)(50226001)(2950100001)(86362001)(50466002)(48376002)(11100500001)(6806005)(92566002)(104016004)(5008740100001)(5003940100001)(85426001)(76176999)(229853001)(33646002)(2351001)(87936001)(50986999)(1096002)(47776003)(2906002)(19580395003)(19580405001)(189998001)(110136002)(36756003)(586003)(77096005)(1220700001)(4326007)(7059030)(15760500001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0301MB1217; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD034; 1:sxnol8xKLcGNhqMTfTwA8baUN6lt7S53zXaQlDPf7tTRYvlNZnWWIFTTlyo5+eI5zlAC13BdyAef65gn5bQy13BDqj9KWx7PdaUG+xwxC1OAOkmmoyxASsgDnL6SdIV8osExPqR+N/ybhYcQ0+GPCJjdIRVF28mQZWuHitrtySe9YN5JOBHSgi0MI46LelY6akCG+0ZPQlNb0R3q+/xtGyWb/X4LpNexuhWslLPiads+r+d0brAN1oU7uxlfmd92qTHbvNJRfa9tgdRez8UMiufqBBXfaa4UMCp9kzIcZhzJ80zE5SBoBAQR6PqjtLa2mXpmms5GeZwMSFMfTx1qxgShdQ6P5T1kRlNsCoegMMofU2Sp1KxsmD/yshO3dcxNZiH/N2+VIUPFoRYFcMwY/P5MHxBuEG/vWL+c3VbPbTqecSdlZdN6gM00kVinHlSWEiggcQ9PgOY8vFdROALMRRpfDI/uu+js+IlM9jIVixYQD9//HTDy3+x9L3ysMhobHVcyNhh1eMUkstFuSh7F9gwJf0gMv0yywG+4qy975D75D/4W/fyjx5nPkWYpFSlxighLAHa6q1828fxZl67xd9k569epLxHy64LT1x/3SwWVD+vkWagf01cjF5ZU4N5/ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e9db1b6c-8ed1-4354-d179-08d365549d2b X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1217; 2:yPCPl//0VChzsqzQJGqoaVfw87bzY+T61IqExna4380TiKNqGmaHbjiN0xpw4syFt72o/W/YQ8j72F/Hk/Eg3i1tQTVR6nmud8YaXBskapckleHbtTPMHpdLT6zkcxiozMrmd2+eoTg71GH3vPyPpw2miD1i983x3u0jj83GBYnwJ5MQi+GFgaPJzSWRxYXP; 3:XQxDcer8rLJs5J251c6x3QzPbs/zAlPJZKAMpTcxeniSM99zjvG9KQC88+HYnsJoakoFwuXQqMomkdFRZ2966cKkJfJEdFrfwk352XNy/POXM+bUQ6xLPXMUUO43wbOs6jEN7bVGhgKSsp1PhIdDaVLUitNoBK8WMH5VCN6IPR0LZz4e88Ruj40rG4jhl9hmLyGo7upZv3jWcrdeXSQ/qt2G/JuQqolFwrnsNq/pg2E= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1217; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1217; 25:Huml7MtbezcGSsHUYqIT3e3KWiXC6AsGv5hDMUJCuyk39v1QxpgfrXT+YkQgg+07Dw23NB5QwLpQQ68qANjDBHbs8TGZPurBXzoytnA//2d8rri6lmitmHwoQPDekEOOA1WB/qhofc+WrpLs8taHPkdXnR7oaxcDSxHXRDRZrhJCEY/DK4iWonvUVerm38vLOjon4mM9LdYYdbpmHd2xFMOjwLm7Dhm5fKk7mQX0sDc+LAxitRTXXRSm+CEVEOYLP7MpTf4kcLzikrjBt1N0HUjjxV+DI6wnTENhKMYmstDtdmUGErgdZonLXhPRO6QSaVYuPL7VjZqE3YY5jpNNYJ+aW5Rymy5H6WV+R0ShLcereDtiN01LDKFP45Xp738YS0/4EC+86xJuM8qN/gYayJiDfVZFWXdlS46n4YQ00icqSDLSpoOqoTJP6aerkvBTO4SacGHCnNfSTAbEqgWdRZXJWaEUiEN+17QrMaSoVfQFtrWWwcf+m0ulQvgzjXhtdTzfm0AV4OUnJ/AG8iOH8s9ipO3FS84gQmeoQgTyIqTjfNEFMQDYVzJ3HKIc5ngpcjwOKLvGKZwFPACi0dL0FmHEvI1uISFVebmX07XahflkJV0ZOG43eXN5C79NuAiMe9McyEqlckiWw8qutYUeTA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13023025)(5005006)(13018025)(8121501046)(13017025)(13024025)(10201501046)(3002001)(6055026); SRVR:BN3PR0301MB1217; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR0301MB1217; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1217; 4:hJ0hZrg0yxOBAWO2JNiuII3sFCs6Ri1+iVEdfAE9ps8TmTbnJvcqCRDMCpAXYafI9gCI6nE4EOEluhKE0i5GCAoXaAG+rs0ecoNg8BTcyAzupTP8PKbU1VO4oIRxkiL/Xb38tKUdXqlt0qd/0NmxQr8c3rcYvV3xi/E6rY6OFV6JayjC2b+5whphK+wUYcHZ0SY7bYp8ONkzeG9C4vEm9uhWkJweY3CrTDybr5/EOdPtAX2GuLmv+NuXlso8174s+bLB4Izdj7dUN6VqDg/ZtXM0cDCNoHUDGk2ZMnB0wEzsg347AI4R0vPWOr85f7+nMEiPzUGsWhBQSjkl+tee1bzknAjO7nIxAQUFE3S4Qv1xNbjUiXFDxL7J9Ux20qDt0i0FIO5BMDkQj52ApzTyHP0PFcXapKiozwbn3PW7fYRO8c8HI+DP8O8MOpGUwYaMZRJg9QXBea5e9ONh8m4TZGG2ym87vC2BEamNNZJlT9g= X-Forefront-PRVS: 0913EA1D60 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1217; 23:qa6c466khJQIhfEEWFhup/Sk+EDL4Mrr7vUWWWe?= =?us-ascii?Q?655xfxqGtBdyySXMt8+lWL7fakpYrspbTfQQsaRl1rMHZQkWjL3UX+DC05db?= =?us-ascii?Q?aoCkCv7pVP5dAGI5LruGpELFla5np8kJPHyhxtq7oOmooeRUyrXK+4wRyB86?= =?us-ascii?Q?0HL9w//G0NK6hStckk9HzMB1MpV3eYI/uwPjeEW+Z3E5q9fQNFelG76gJuSs?= =?us-ascii?Q?aAA6Q61MbFMuVxl+7nfWYwxJ8ZR/0z94vKeneymSgeQ46aQIzR7Ss3ZASRZi?= =?us-ascii?Q?+spr8yCBFpbUc67ybuE2WO/ZBNCrcc/XG0X4z+DQtkASrjVDu23BaESYW+Ou?= =?us-ascii?Q?gsbUB5yc77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MB1217; 5:UemmXWeRLy6vECR/WxAFtSZPdsGo1dex+buG++4XwGWNjTj1baV1TbhR6FC79syaFrbXhRIK4FhF12e8pnnQgwcNpG9J9lhHwCTlzLb6h4BGHsHNVrjJIPNxezs/bqHPSuZJdg3/a/tAJ7e2kLm7u47UcaJVOI6okRXJOq/TaFQ=; 24:rNr9o4PydRcRKhXOAs+c/UXBVDUlZlzS4AuK4KlpadNWvC0i2dOCztRzFsSwWO5rQsYvhaw26qZueh44WQMDgovW3JSqFJX70k0flraQq30= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2016 17:37:27.5584 (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: BN3PR0301MB1217 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently when card type supports EXT_CSD_CARD_TYPE_DDR_1_8V which means it can work on DDR mode with either 3.3v IO or 1.8v IO voltage. MMC core will first try 1.8v then 3.3v if host claims MMC_CAP_1_8V_DDR support. However the host driver voltage switch code does not check NO_1_8_V quirk which may set a wrong 1.8v and causes the card fixed to 3.3v VIO un-work. Checking 1.8V quirk before setting it to avoid such issue. CC: stable Signed-off-by: Dong Aisheng --- drivers/mmc/host/sdhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 2338aab..96ccb15 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1683,6 +1683,8 @@ static int sdhci_do_signal_voltage_switch(struct sdhci_host *host, return -EAGAIN; case MMC_SIGNAL_VOLTAGE_180: + if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) + return -EINVAL; /* * Enable 1.8V Signal Enable in the Host Control2 * register