Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6537995ybc; Thu, 28 Nov 2019 00:55:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzxHZy7FZpOO6WfVgVyuIvFBx6Jl4oXgt9auXhN0lxYSU+jn0B7ZdtZ2EgeEQ+PhL5t5nmG X-Received: by 2002:a05:6402:2042:: with SMTP id bc2mr37028328edb.167.1574931343659; Thu, 28 Nov 2019 00:55:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574931343; cv=none; d=google.com; s=arc-20160816; b=wZASIHrgl33+cTJq6ZCrri3pKPpbL6K+EAzZnEw2ktETcFWC/h8XMPJyeg1Y6uCqfk pVNgpwlpyHACYBE2t6Cn+oUsPwNdN1azRAKzkj+vjIzEegAY6XyoLuqFOcAuytf0mLsK TEZXIiCTPOhm82lLQDHP5WASwd+88Plm30Q1gUO04zebg+49iBQJf4myXReJlhgi3U07 TgSD7jhk0IdZer3MHPVx+JcR2LbKrufQgeFyRQ76jD6dv5knmma+9d+Pce45PB3hSWpl wSm9nfvPTCVGjVgwm9Z8WFnkxTONE27dGBsiShDI8Y4IwXLX0Oy1PytnwioiUZ/bUCMP LP0A== 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=YeiqDx6xy0lLTLKZ4JJ6oMuelrCkWsSmvcEt2fV6Ns4=; b=I7JEYfdnSDDvIpuiRPLKb4u43SnKxU+lMQydOazuzAB/hvIaMK48FtU9eYsf8Ov0SN Mf1cLUoL8wPSnRd+uajqid5zbaVm6Z+gYaCgrstvJ3Fm1OzmF7R3WKTZImhEboaszDsM VK9Q/kuvXVaO/tsPTbhcJ9iZRbP1BlgtMXMVs8/xgQgVzM6eLj04E96NtmKxQ1wt5Yi4 MtZAO4HNI4LzlIaVxRsUJamHdidP+2p8i2Lp0FZdzJbdjBZATPDsen9jMbibIdXs2Ohj zgYyozCz8OoW90IyojEyX2+jh+YTh+IIumRBQhj8JST85tCgV/4UOOmiTl59arz0uA/8 8xBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=e5Y2B5c0; 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 cz19si2745280edb.109.2019.11.28.00.55.19; Thu, 28 Nov 2019 00:55:43 -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=e5Y2B5c0; 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 S1727415AbfK1IUg (ORCPT + 99 others); Thu, 28 Nov 2019 03:20:36 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:42154 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727141AbfK1IUg (ORCPT ); Thu, 28 Nov 2019 03:20:36 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAS8KWpb108601; Thu, 28 Nov 2019 02:20:32 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574929232; bh=YeiqDx6xy0lLTLKZ4JJ6oMuelrCkWsSmvcEt2fV6Ns4=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=e5Y2B5c0YN7+bkDzQrRBfV4wcDP4iPzLh2JtIINqVswslCLf0f7TJgmGCWKvCw2Ms pFhKEHW/lhp3+OgtUoNVJrrnLlx9KPdflssR/N+SOCXoMvwtC1cisalSddQJBax9S7 kbRIYf2MwMS/KUfWgi5Gz6v/t+OokxzFApSXXZW0= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAS8KWDr067235 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 02:20:32 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE100.ent.ti.com (157.170.170.30) 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 02:20:32 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) 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 02:20:32 -0600 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAS8KTAH062029; Thu, 28 Nov 2019 02:20:30 -0600 Subject: Re: [PATCH] mmc: sdhci: Fix incorrect switch to HS mode To: Alan Cooper , Ulf Hansson CC: Linux Kernel Mailing List , Adrian Hunter , "linux-mmc@vger.kernel.org" References: <20190903115114.33053-1-alcooperx@gmail.com> From: Faiz Abbas Message-ID: <7e495749-1539-9164-d801-305a918318d6@ti.com> Date: Thu, 28 Nov 2019 13:51:14 +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: 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 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. Thanks, Faiz