From patchwork Thu Jun 11 13:24:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6588501 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 98D55C0020 for ; Thu, 11 Jun 2015 13:25:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BECE2064E for ; Thu, 11 Jun 2015 13:25:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C6B320650 for ; Thu, 11 Jun 2015 13:25:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752445AbbFKNZV (ORCPT ); Thu, 11 Jun 2015 09:25:21 -0400 Received: from mail-bn1on0136.outbound.protection.outlook.com ([157.56.110.136]:4320 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752867AbbFKNZU (ORCPT ); Thu, 11 Jun 2015 09:25:20 -0400 Received: from BN3PR0301CA0080.namprd03.prod.outlook.com (10.160.152.176) by BLUPR03MB246.namprd03.prod.outlook.com (10.255.213.18) with Microsoft SMTP Server (TLS) id 15.1.190.9; Thu, 11 Jun 2015 13:25:15 +0000 Received: from BN1AFFO11FD025.protection.gbl (2a01:111:f400:7c10::127) by BN3PR0301CA0080.outlook.office365.com (2a01:111:e400:401e::48) with Microsoft SMTP Server (TLS) id 15.1.190.14 via Frontend Transport; Thu, 11 Jun 2015 13:25:15 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.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 BN1AFFO11FD025.mail.protection.outlook.com (10.58.52.85) with Microsoft SMTP Server (TLS) id 15.1.190.9 via Frontend Transport; Thu, 11 Jun 2015 13:25:14 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.82]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t5BDP9CG019819; Thu, 11 Jun 2015 06:25:10 -0700 From: Fabio Estevam To: CC: , , , , , , , , Fabio Estevam Subject: [PATCH] mmc: sdhci: Clear MMC_CAP_1_8V_DDR in the SDHCI_QUIRK2_NO_1_8_V case Date: Thu, 11 Jun 2015 10:24:40 -0300 Message-ID: <1434029080-11298-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD025; 1:rMkQ01zaYiG34nwGkO44K4jg5AWLNzYRfjaWCKyIVMQNYzFbQlExw4AOCJm2Pj1yX5j8N0Iui/uySIbe0S/UE41l4WI9xrtmpCPjmjg9gPYoGb3481tgmIJdaybui+waPezHpoDHGxPpICZ3ge/Wf5I2HAMKwaq4LDvX7Ps3U+4PcwdlEfI4CgsJLPDQidMaMgDwZNQoos83YJNxI4qhdOrmEayOMK0gJm1eVUp2uaEP+lBzjiZhDhINHweS+jYA0yZ9UnEGX3Xq6F2MnMrgFcz2p43u727H3i9xAD5MvNEeIz1UkPKsFIebpwge4QEQRxQmPzXtGI12PmRhQ/t+rvvHMfpoMaET2JhQRv34icE= X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(85426001)(105606002)(19580405001)(62966003)(107886002)(77156002)(110136002)(5001960100002)(36756003)(77096005)(189998001)(19580395003)(2351001)(92566002)(229853001)(87936001)(106466001)(86362001)(33646002)(47776003)(48376002)(50226001)(104016003)(46102003)(6806004)(50986999)(5001920100001)(50466002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB246; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB246; 2:e50YtNiZKTtfvwF9cGco4rfSR5a50v63LcsGo8GDnq689RjoOOCRpeJ7cCsEPsaf; 2:kSGs+X4dUUGNBRuWsaz04AfVh28h0UbNFXJE9aXuwE7NcVHyJqGEZyfb1SMF9O9h9JDceQzWWkqa7+AfNDBQ1bzgLunC5Lx+Msv1cyrnsV+zTScNvs2RcBg4t2bxZqqxHwXmH/fKHcA2+Uk2S8SQq7zfUNnhZfRi2quXxzoGlAYuN+MfxWQxPz7RxFTesPIPrjH2iflU6Wh6Nbgkfwt0/XtyaX63KxQYIW4fr/f7Tno=; 6:jl1t9lo2k7lEC1MQu0pgqoEBGR8584TJeiQZVQsOPJ2Bh1DB2CKDwsii6+L4QYKxO9+TwnJ7WAjmR+6zd2N3KqgYyLz3dFY+kYcOOPb3rj69UmJWf3twAt5512gIqRr1oTRtv3iQLpnqzKXhz7kw4pfGIOKPhsb4CWgHrpTj+qnn+15vfjQ+bpUQseN+BARFnEAxDJgE4oi6WVtJdVez82Py0WPGlbgybOY1dAw8iEeHJJ0ZqhxClQr2tdTlko+yTwFEF2iL3yl5OrrqFkewe0VzS7booytxmCQXEYhKweoUuZ5altYXJAZ+qbwXTlQAUgaXdQwVVcOcNvoRfH/3zw==; 3:F5o5Yna2XzSssji/VXqls9gA3H7msaW5B3FgsN4UPqr3pGL3VC9j5r9UIkRk+bJIR2JOQsJD7J/Q3YYeT1MuR00e82B6ywlCczHluBmIdn+EutYzte3+8qGfMb7eeEbisNxyVpD7sDqKPwsXKD45Ohfr004qMngiBep10os4BA7yeIfSZQF/3+wo9OkPWOU58Wf3tciLE0ZYfx4wocnaYiHyJMuG3kps/v64mtpSo0TLnojIbLqPwrafZ1e7RYAC8HVhobVfHl4+6iGVYLSXpLYMkNF5PI Q+wsMQnVUN4KvUwgWKuSg+C9kINzvr9md7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB246; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(520003)(5005006)(3002001); SRVR:BLUPR03MB246; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB246; X-Forefront-PRVS: 0604AFA86B X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB246; 9:vGdNI/bCofiipJ7xk0oJIRNvhCIWT98pZuQWNhCJIRQJRT7sJWHGR4P0e9TsmvUxlxLR8GIWc7HaQLXBej7+MOA0hoTFBMxQamruHYk6VoPDDJCvKXPhTWQxYpYyMBefnswpgdP9TZZgncPltw6Nt5/AJ3CXXj2ej6XWmNB8hyTx1IjzfeVM/GgNRsrumdO7Ii8zPHvtH2grf4ZP4KOs3eo+Jeum1wo8qowaxl5fC9l6iH/7207Pi+4AFTMj8ONPm2AEjqmFpmp6FCu3kt84/qDys2aVlwv3K9IPjC5pJXgqFWNSYWrfDGfjUmxCxylPgAdpx5FeC9DGi+EcinTcqdiFWB/8X0JLS4jgzPLbLca9AEmbdeOhZGJxJrKIPnkvtDOTkpD5qqurJ9qWctWQoaIEav+ViLlEexiyETsl1XI0vT4SntoOhe4JZgSif9HOHRN1+gFKAckHKaA7z072Qjq3qjhpnXiMdzHDEU090MxUpP6/vzTBf28LGCuBoNEGe6pCvOdQr1IThhZasbDPg1tlCz0F2znxFFCwchY+GBOSwVwwIwozgYjZ8pABFyTbsYDfZfN6wWg4QMuZEsFS/gg6RTPP0IIDAfzIgihJl/XuGVilCyRWCKrvzDcMh90fioOCsqDlQK0EoRoU+n7PyjhWHbhLZWZw+nKE+NFuWqHJ94GvKXjI7gOqt4wW6U5OdZnY+usCZakLOgK/ybuwvpvFBpd7AoeAflhI3JQPR0iGs49uiBW3xi6LJVh5y3w64pu9IeFwh6r9DOiiC5kGRGCo8GgYoDfwBfLl6hyLJfsUMcuW1tuD6p97c50MyChLNYf59T7sn/1oPtlvtXyojmzCJHJbPza+DHM7xCk7As1NF7RcWiihZ+WUEJYJ87F/ X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB246; 3:Eya97HoHk6480eYhN9GmTIYT/E5oxOfP/RJTzvzI/NN5W4k/jPUv6Eid9y9LYv7V0TtZ04ay4se/bMvZTw1JnsmIXa0P9MMpl5Ayni/PWHBsPHWKzNFmRrfGba/of14GeQK1Gzco4KcU9HBMaM4RCw==; 10:xdLwQeyJVHwcoSLwdBvVOtPnuptFqE9v3QfuzMXTdcmukMdZpkQiQHGEVpTX75Jk4gdXzxrCKRAaKu+h6TSn3ETYJqkVQGs9Y2/0oudn0UM=; 6:yTC3hJ8g+thaTdqI/dOo3N4sQuxzUstTUAr7hh1MQjzMrqXndIWnSIhbQxEedghg X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2015 13:25:14.6415 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB246 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 From: Kevin Lemoi SDHCI_QUIRK2_NO_1_8_V flag should disable MMC_CAP_1_8V_DDR. Otherwise we get the following errors when accessing eMMC on a mx6sl board: mmc0: MAN_BKOPS_EN bit is not set mmc0: power class selection to bus width 8 ddr 4 failed mmc0: error -110 whilst initialising MMC card mmc0: MAN_BKOPS_EN bit is not set mmc0: power class selection to bus width 8 ddr 4 failed mmc0: error -110 whilst initialising MMC card mmc0: MAN_BKOPS_EN bit is not set mmc0: power class selection to bus width 8 ddr 4 failed mmc0: error -110 whilst initialising MMC card With this fix in place it is possible to successfully mount the rootfs from the emmc on the mx6sl board with 'no-1-8-v' property passed in the device tree. Cc: stable@vger.kernel.org Signed-off-by: Kevin Lemoi Signed-off-by: Fabio Estevam --- drivers/mmc/host/sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 706bb60..10304cc 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3140,9 +3140,11 @@ int sdhci_add_host(struct sdhci_host *host) } } - if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) + if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) { caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50); + mmc->caps &= ~MMC_CAP_1_8V_DDR; + } /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */ if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |