Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp282619pxa; Fri, 21 Aug 2020 07:12:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmvCHwr2LWlclN2hVC0BGgoKnkaLQsJa9BGz1FvPNL38NyjfM5p9thPxzbyJx0d0prRny9 X-Received: by 2002:a17:906:374f:: with SMTP id e15mr2953676ejc.528.1598019142766; Fri, 21 Aug 2020 07:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598019142; cv=none; d=google.com; s=arc-20160816; b=FOy7OTm1fSSsWdZsTN1q3vOPbPmMfucYnbUJvMe29+ppkziowcVgg0wYkOYNamo2lb AGoP/6gL/iQdGYXQVVXQJVriVxqGWk6h59c6uqBDaUCHVf6oWoAFw8yMlqwzmyimvkaP 2tMNTI7zXrpRJYCaWd/JyK5HnuwqcuCGZa8jfD9CaAwx+Dy4RA3bxBdSPd03t3LQrtqj +eIr8Qy8nqnEAXUtw53FqkNXBKU8K0UZTw4ffHIaXBs1tXffeIkIhc2be1x4o1EolUDk rd8ejmw00gs962N0uz74mahUAIWMFbge4aEiXrXjLArif4sgjNO2drCriTWH42zXOYhG q/Yw== 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:organization:references:cc:to:subject:from:ironport-sdr :ironport-sdr; bh=T7ooVi17K4KD3DJ+qU6zO4lg+hW9vTP/uvg3+m+phWI=; b=Hj/QGtu1pL/ZQs4jye38qbmJD/cpX/gc+qha5X9+2G1s8YUJboBla681VBRQYyXEBW 2pKEs7o5z3Zdd+ux0iffDzQzfnYzrvMqSywze86YhFibo/9U4B+TJNtvGKDAWRmNr6/N jf6p1cUKx8Lb2uZOeijLtmDHfqsk+9Z4vPXVNhaM8JUIGvF4jwKY9CI0scecycwepSz4 fzvjoCDlZgRzQbnDYGRRBnrwaaO3D8NZONv3xLil7/JwtUvfe1jctTN7Fd25DnXhyMrs tYvu9yCOvCpyxqcvfWYVUsAOmqZ5AZccXL6AgJ5NZaEnv4gmGxn1mZnBEFzL5shQKDu4 LviA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si1412334ejx.280.2020.08.21.07.11.59; Fri, 21 Aug 2020 07:12:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728006AbgHUOJh (ORCPT + 99 others); Fri, 21 Aug 2020 10:09:37 -0400 Received: from mga06.intel.com ([134.134.136.31]:13635 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727995AbgHUOJg (ORCPT ); Fri, 21 Aug 2020 10:09:36 -0400 IronPort-SDR: FKCO65XV3GNOEJkOMQbzA9Gch6yfwA8EDgSNTb1nzVGucWcjMZsVUHtqycz7WUH/Sa3gFZ/VAd MHB0Xevx+ffg== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="217075426" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="217075426" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 07:09:35 -0700 IronPort-SDR: 0gaXXBQ4OOJw6UgRoqkKvIzfdJQglRwfV92/z8XVTVpfJ6iyj2KJfR8phG7v3QYbKRS9yLpiJX Xi5Er3JNLtHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="442357202" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.73]) ([10.237.72.73]) by orsmga004.jf.intel.com with ESMTP; 21 Aug 2020 07:09:33 -0700 From: Adrian Hunter Subject: Re: [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip signal_voltage_switch() To: Ben Chuang , ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, ben.chuang@genesyslogic.com.tw, takahiro.akashi@linaro.org, greg.tu@genesyslogic.com.tw References: <20200710111104.29616-1-benchuanggli@gmail.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <9ab64a9d-cd78-785c-b48f-561048cfe2ed@intel.com> Date: Fri, 21 Aug 2020 17:09:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200710111104.29616-1-benchuanggli@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/20 2:11 pm, Ben Chuang wrote: > From: AKASHI Takahiro > > sdhci_start_signal_voltage_switch() should be called only in UHS-I mode, > and not for UHS-II mode. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 5511649946b9..7f2537648a08 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -2623,8 +2623,13 @@ int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, > /* > * Signal Voltage Switching is only applicable for Host Controllers > * v3.00 and above. > + * But for UHS2, the signal voltage is supplied by vdd2 which is > + * already 1.8v so no voltage switch required. > */ > - if (host->version < SDHCI_SPEC_300) > + if (host->version < SDHCI_SPEC_300 || > + (IS_ENABLED(CONFIG_MMC_SDHCI_UHS2) && > + host->version >= SDHCI_SPEC_400 && > + host->mmc->flags & MMC_UHS2_SUPPORT)) Please look at hooking ->start_signal_voltage_switch() instead > return 0; > > ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); >