Received: by 10.223.185.116 with SMTP id b49csp5961790wrg; Wed, 7 Mar 2018 22:44:02 -0800 (PST) X-Google-Smtp-Source: AG47ELtQhWbccD/jM4CK5VKYw2Ux9KdEy3SvAMmqi+4s+x9DwvjNCs9YBbKvAySxxpgotlsDXzN1 X-Received: by 2002:a17:902:57db:: with SMTP id g27-v6mr22475184plj.75.1520491442901; Wed, 07 Mar 2018 22:44:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491442; cv=none; d=google.com; s=arc-20160816; b=DIfyBMTUR8EYoA/cocHi2Xf4qswiCIIW3+AIjUltiehnSxgunPCAnj/HuvlLgAXFTE 1YTWMWGG+D1bvt2AaxPj/A/9NYpOoX4MsrEhBfOuLC+Wrwc2M3m/p1h2YDw+O19f/MQI cx1nwzFCQ24AcSnIErcYhJXeRWTTDrddJcmCla3xzcUY1LzMNHUqGUHmr4NI5faL2Rj+ tPBI6DbW2HhPFHfORxJdpAG6ZwDuU0QIstdDaVLsaohhHFtRCuuu6SiBDXGRc0v0xCTU zynvJMrxWL005M3Jx0oqAKWaOS+vK4aV4Hq2fdISMat3GfA6/n7dCNXfKozZ20az8BEa dIYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BuGBHe60/AA4lZrmGuzd++QNg93LlMhYQOA2ecNEiDg=; b=hLRpKN9BLW+bushpQ99bXF+D6e76g+DKeLZIVlcuUgAW5dZIttojQdlr65J6I8lKNF Ig71F4GIQb0xMykHpVmJkGddIX8XVgxu/GTtPyCoDpGd4fMrWkQy/BDRtp9sjSoqeR7v FE0C7mjXufW+eHHQwNQ0R9nPkMvJ/ZsGdE5CnkMJlKMbR1GMnZMijgIxt0UUB69iicuE wBkApXhHhsTPEeyU/n66zMnt9f3VVntIAYLxngO/meOlRAs+uMxZ0i7GovuH9HAwwhhi vq9Huk9tfNf0qod9z/0Vn5so7eOmd9Esj0EF+zz/7OcG78pTb8uAtCzTBpcZDKkE73wO dPUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=l0pC1Fh3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si12552980pgc.671.2018.03.07.22.43.48; Wed, 07 Mar 2018 22:44:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=l0pC1Fh3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965311AbeCHGm0 (ORCPT + 99 others); Thu, 8 Mar 2018 01:42:26 -0500 Received: from mail-sn1nam01on0102.outbound.protection.outlook.com ([104.47.32.102]:61147 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965250AbeCHE7B (ORCPT ); Wed, 7 Mar 2018 23:59:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BuGBHe60/AA4lZrmGuzd++QNg93LlMhYQOA2ecNEiDg=; b=l0pC1Fh3kvok/wsIDP5YtU8+B7I4lg2GxaqLTSefx2K4zfF3Zmi2TD+vtDZWQkrpiqTXErYYsUk4g8tTWCvVyhKnIB8TfWriLjLoTt38zRnyeq5eBe23McofTzweuyy8Ju9F2v1wMsOqaYjpGgirM3HfKno9bPhBflOBPspKa4M= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:58:58 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:58 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Zhoujie Wu , Ulf Hansson , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 42/67] mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable Thread-Topic: [PATCH AUTOSEL for 4.14 42/67] mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable Thread-Index: AQHTtpoBLFaJQNRJE0m/8n+cOIbtTg== Date: Thu, 8 Mar 2018 04:57:49 +0000 Message-ID: <20180308045641.7814-42-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1015;7:k0gADKSyTj/k9XMHAuD5G1vsPVTIiBZATuN3FEJ9XI3udyyPJ42OR4Pm64xatFh3E0DLrC0CbHLcgGlujHavrGSkZWMM9i6bjy0nawWW3CA0hxoIHXzAFvthgzoMLY2FVmCRP5EutJijHJB2W/I9gw7hJx0ql3f467+vNVDDzEUxNBYEtxfjMlIsabztULrus0x2OOYHWonSNtFL0Pzxx2U4z7AbYWQpv/yToIdePzqvugaJ0IHGQoCsrDIGBdJK;20:d1zQoxBZP8cpiSpiP3ZBsC09SXQyMmXr7o11zXbdaRP18C7d+Hj/zX5SHuKXVllfDhnysG3mpUNSzGu+OtQ/QDd95o0Ayps2CP2NLfhCLWm3YGXsMeOY/UQwkIMic4/Dfu++RIxgT7+O6kOCVa063/Tu7Od1pIRCAn3wRFKSWoQ= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5366cab9-3560-4ef7-901b-08d584b14d9b x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(20558992708506)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1015;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1015; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(396003)(366004)(39860400002)(39380400002)(346002)(189003)(199004)(6116002)(53936002)(1076002)(107886003)(3846002)(3660700001)(10090500001)(6666003)(2950100002)(2906002)(6512007)(99286004)(8936002)(6486002)(76176011)(6506007)(68736007)(316002)(110136005)(81156014)(81166006)(8676002)(54906003)(3280700002)(2900100001)(6436002)(97736004)(72206003)(25786009)(10290500003)(86612001)(4326008)(305945005)(7736002)(66066001)(22452003)(478600001)(5660300001)(86362001)(14454004)(106356001)(36756003)(102836004)(5250100002)(105586002)(26005)(2501003)(186003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1015;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 3oXAtk3Jz/1NeEiWvadEJgZOdgLZ96D1HtMBNUcnAu5rzGc293Md6TSljLyMUi13fEiUAkrl4EekmarhbLecWVytCftpRLlBm7JsiKeP+D7IcYtHIEumlQOlYHT7wXkJWOKH17QNqI3n/iIxNGC5YJwoxW2BDkQzIV2hV9uRN+B+xOv52CNOk7SLFfsywUL1DZhhLSPQ/gebo2DEi+g9nyYSSvQkpBCbPTe2J5XO8WTveUl4axaHK4ANLqjNPDQ5x4xg28TXSuY1mVPp896PJ0UalisA9s3p3u7bmy6G2A1nAtZBtzOdesM2EGhjjLLiZzLRMxbeXp1WAw0zHm2V+g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5366cab9-3560-4ef7-901b-08d584b14d9b X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:49.8946 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhoujie Wu [ Upstream commit 8d876bf472dba73c015cea9feea80dcb80626a7c ] According to SD spec 3.00 3.6.1 signal voltage switch procedure step 6~8, (6) Set 1.8V Signal Enable in the Host Control 2 register. (7) Wait 5ms. 1.8V voltage regulator shall be stable within this period. (8) If 1.8V Signal Enable is cleared by Host Controller, go to step (12). Host should wait 5ms after set 1.8V signal enable bit in Host Control 2 register and check if 1.8V is stable or not. But current code checks this bit right after set it. On some platforms with xenon controller found the bit is cleared right away and host reports "1.8V regulator output did not became stable" and 5ms delay can help. Implement voltage_switch callback for xenon controller to add 5ms delay to make sure the 1.8V signal enable bit is set by controller. Signed-off-by: Zhoujie Wu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-xenon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.= c index 0842bbc2d7ad..4d0791f6ec23 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -230,7 +230,14 @@ static void xenon_set_power(struct sdhci_host *host, u= nsigned char mode, mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd); } =20 +static void xenon_voltage_switch(struct sdhci_host *host) +{ + /* Wait for 5ms after set 1.8V signal enable bit */ + usleep_range(5000, 5500); +} + static const struct sdhci_ops sdhci_xenon_ops =3D { + .voltage_switch =3D xenon_voltage_switch, .set_clock =3D sdhci_set_clock, .set_power =3D xenon_set_power, .set_bus_width =3D sdhci_set_bus_width, --=20 2.14.1