Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6602213ybc; Thu, 28 Nov 2019 02:14:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxL1cRfkuJk8xoaIlgcZEmxFR4lIpWg2HPhGOQe1X2i163DdzLz0iYcDrgPLdCn9AUqXDcq X-Received: by 2002:a50:91d0:: with SMTP id h16mr37155200eda.203.1574936059555; Thu, 28 Nov 2019 02:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574936059; cv=none; d=google.com; s=arc-20160816; b=N6ckAMeuOlw9I/1Uv51RYV7a3DnFxnV4EgrLEMBA6yTyn4PGRuLH0b3hUUrJ3sKRfW UD9QRpspVKT5IwE0LlHymYpwczz8PpZV5xiG/JnSM6axf5UmMy9amsck3yy0S0wmR84j y6QOXimOubEXnsJOV7ftacP4ee6TzZ5+RDAmo8IhJQVJCmQOaMTkffaA3OBBtmUDkMEC lrCgoe+Z7JRVAF5tWl8LXhCRsWr0Pa+Z0Yq1oKQQ9cNaLy952w0T/VLVeVGCIHW3/Fg8 62TwrB3HocJmlUw+6F4ABXlE1+8iLyrEMqxnSrgx/x4mKaOk8xARJJtWTz5klPR4RZne lPYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=fUJokwFNOJXpknCrMcpTrziKaDtWMVGaJuYHRrG6Rm8=; b=XVmNiFwzh29fzMV2hgshZkBn6WAQNYNNAocbxi2cLei7ifobh6Tl6i/na7js5zQqYi OLEqWY/rfOmEZs997P3+9RMGNHRkMRJMBh3j+J0USQOeivDZtwqp8W9kvucMro9MS4Kq rwGsuwJawd365yTf4BvZ86/sxP6IW6YKhiOhZF1Ru4sJENF10vAaJaplO0FoOnzsAuKG AANA9OQ0gF0jtmVjR5Ir/QCpUhZ/SpqhYbB28dotGnjVlF71J1bgCwOJKZHZpNhjtUOx 88iafTpYMYrXNDL3WS03FRRqEGgR+89Pt5XlR7wdpk85E2Nw8S0GcbnpNuE2FzdEDV/H fURg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b9U7ovKZ; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd21si6251687edb.111.2019.11.28.02.13.55; Thu, 28 Nov 2019 02:14:19 -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=@ti.com header.s=ti-com-17Q1 header.b=b9U7ovKZ; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbfK1KME (ORCPT + 99 others); Thu, 28 Nov 2019 05:12:04 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:54028 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfK1KMD (ORCPT ); Thu, 28 Nov 2019 05:12:03 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAC0Nw088155; Thu, 28 Nov 2019 04:12:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574935920; bh=fUJokwFNOJXpknCrMcpTrziKaDtWMVGaJuYHRrG6Rm8=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=b9U7ovKZraVzYMXkUIiwnORlbBokw3ywoFl1iccuIGg3caScMd8Mv4QwHYCVcryXQ vcD+fuRj4km9GQf4wEDAbe1ZkdidY4zBg9VP9t0RlA08eHwV6JMxNHsvidCK+nCn7s TtCxnW3FccsUhwgnXKySLfm+jsDsdRMKagfZLc24= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAC0nP063319; Thu, 28 Nov 2019 04:12:00 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:11:59 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:11:59 -0600 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASABvep023862; Thu, 28 Nov 2019 04:11:58 -0600 Subject: Re: [PATCH] mmc: sdhci: Fix incorrect switch to HS mode To: Adrian Hunter , Alan Cooper , Ulf Hansson CC: Linux Kernel Mailing List , "linux-mmc@vger.kernel.org" References: <20190903115114.33053-1-alcooperx@gmail.com> <7e495749-1539-9164-d801-305a918318d6@ti.com> <6de5746e-bca2-fbe7-ff48-46103b9500a7@intel.com> From: Faiz Abbas Message-ID: <18618a7b-3ba4-86b3-b6db-29cc501e4594@ti.com> Date: Thu, 28 Nov 2019 15:42:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6de5746e-bca2-fbe7-ff48-46103b9500a7@intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adrian, On 28/11/19 2:56 PM, Adrian Hunter wrote: > On 28/11/19 10:21 AM, Faiz Abbas wrote: >> Hi, >> >> On 19/09/19 5:27 PM, Alan Cooper wrote: >>> This does correct the sequence of switching to HS400 but it might be >>> safest to just add this to the latest until it gets a little testing >>> to make sure it doesn't expose some bug in existing controllers. >>> >>> Thanks >>> Al >>> >>> On Tue, Sep 3, 2019 at 10:52 AM Ulf Hansson wrote: >>>> >>>> On Tue, 3 Sep 2019 at 13:51, Al Cooper wrote: >>>>> >>>>> When switching from any MMC speed mode that requires 1.8v >>>>> (HS200, HS400 and HS400ES) to High Speed (HS) mode, the system >>>>> ends up configured for SDR12 with a 50MHz clock which is an illegal >>>>> mode. >>>>> >>>>> This happens because the SDHCI_CTRL_VDD_180 bit in the >>>>> SDHCI_HOST_CONTROL2 register is left set and when this bit is >>>>> set, the speed mode is controlled by the SDHCI_CTRL_UHS field >>>>> in the SDHCI_HOST_CONTROL2 register. The SDHCI_CTRL_UHS field >>>>> will end up being set to 0 (SDR12) by sdhci_set_uhs_signaling() >>>>> because there is no UHS mode being set. >>>>> >>>>> The fix is to change sdhci_set_uhs_signaling() to set the >>>>> SDHCI_CTRL_UHS field to SDR25 (which is the same as HS) for >>>>> any switch to HS mode. >> >> This change has broken High speed mode in SD card for me in AM65x-evm. I >> guess this change only needs to be done for eMMC. SDR25 is decidedly not >> the same as high speed for SD card. > > Shall we revert c894e33ddc1910e14d6f2a2016f60ab613fd8b37 and then Alan > could send a patch providing the desired behaviour in ->set_uhs_signaling() > of the relevant driver e.g. > > void ???_set_uhs_signaling(struct sdhci_host *host, unsigned int timing) > { > if (timing == MMC_TIMING_SD_HS || timing == MMC_TIMING_MMC_HS) > timing = MMC_TIMING_UHS_SDR25; > sdhci_set_uhs_signaling(host, timing); > } > Yes. Lets do that. I will send the revert. Thanks, Faiz