Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1983413pxk; Mon, 14 Sep 2020 01:15:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymB2PWZGJvzNuqGIt9Dr+m7NwAwDxNntNemVRJpzgSi4Sf3AXjcfUEp0VfxBaPVt7tii5M X-Received: by 2002:a17:906:bcd5:: with SMTP id lw21mr13516249ejb.430.1600071330619; Mon, 14 Sep 2020 01:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600071330; cv=none; d=google.com; s=arc-20160816; b=iE+JzelmsNM1hZcKKCTqzyAHFPJzr37PnT8oFN+2DinBNKRObNgUo4aVlvo5K8bG93 y/s/Wh1FVWZEViEybQy22ZwmHN2uCESLO+HbOTobuuACxNcEciUZehh1fwEp51+Sv0Xx Ti5LjtrGFb2oxUp5f96herD9E/5I0NNJtCx+XMJo0GgKQnelxnnUeVilwdXdZic6S0Ai umYUsOYr3mLZt3KUidoDwcB4RAVoB0bzbLlmP9I/50QwgJU8BQvH/KcNPBdfHZA1m/HX OyE0I+AI3uoJjb5WKpo2bjnQ7fQprxUj27/OsUuj6Djli65r38CmRPW5KI/7Imvtvwk3 NCTw== 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:from:references:to:subject:ironport-sdr :ironport-sdr; bh=7RWskE+HDZ35w18oz6aULlalY7iwaPW2Xt95byc+Cpk=; b=MfONU+xS2YYb+5JMsBcMD1vJFMva8JxZe8dUeGlM5drRkBp8Zky1290hWiGmWcWWPp bOMbf0k+59CHECar0toeF5SN5GMYyQCeJgcYhyi3EGhmKv952ttgU8oKLWg5aH75C3U3 EhTrs6DWaAEMw+iFtnQpyHjMJkCFXuFpsmjA0iin9QF9oOIi3xsZ1HPpCw2Z6gbAD7Nj 7oQyKL88ji1PnYFxNKHErXtAAaTGkT6MCXKEh7AB1AISYRnlsDP0mKgy5Ih/vT8EyX37 E7vGMMNVaSWOOmS8iYjxfeiek1GtWKUm7ADhm9Dd2rhTBJeRDrN29F9kGfPIHnmq77iW NKTw== 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 o11si6237757ejr.667.2020.09.14.01.15.08; Mon, 14 Sep 2020 01:15:30 -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 S1726235AbgINIMC (ORCPT + 99 others); Mon, 14 Sep 2020 04:12:02 -0400 Received: from mga18.intel.com ([134.134.136.126]:26862 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbgINIJF (ORCPT ); Mon, 14 Sep 2020 04:09:05 -0400 IronPort-SDR: HHVcVZbpZy0ZOCJyWvkMk6D6xXm7mzqD8erW1fhBcCpQZmeqy7vc2v1QLSrTtFRPbb2DbreGxo 4hxP/WfMZk0g== X-IronPort-AV: E=McAfee;i="6000,8403,9743"; a="146780957" X-IronPort-AV: E=Sophos;i="5.76,425,1592895600"; d="scan'208";a="146780957" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 01:08:42 -0700 IronPort-SDR: ibFpH2XMJyKrwM93Dd8zZBRyDTabJLqYves4nwbbb4NnK4QnfUgU0Y+vj60iG4uU9gltQs46Zw Wc4RxdFivM8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,425,1592895600"; d="scan'208";a="408790526" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.190]) ([10.237.72.190]) by fmsmga001.fm.intel.com with ESMTP; 14 Sep 2020 01:08:40 -0700 Subject: Re: [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip signal_voltage_switch() To: AKASHI Takahiro , Ben Chuang , ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, ben.chuang@genesyslogic.com.tw, greg.tu@genesyslogic.com.tw References: <20200710111104.29616-1-benchuanggli@gmail.com> <9ab64a9d-cd78-785c-b48f-561048cfe2ed@intel.com> <20200914064001.GA2743583@laputa> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Mon, 14 Sep 2020 11:08:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200914064001.GA2743583@laputa> 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 14/09/20 9:40 am, AKASHI Takahiro wrote: > Adrian, > > On Fri, Aug 21, 2020 at 05:09:01PM +0300, Adrian Hunter wrote: >> 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 > > Do you mean that you want every platform driver who wants to support UHS-II > to set NULL to start_signal_voltage_switch hook even if this hack is > platform agnostic? No, I see UHS-II as a separate layer i.e. UHS-II host controller driver | | | v | sdhci-uhs2 e.g. sdhci_uhs2_start_signal_voltage_switch | | v v sdhci e.g. sdhci_start_signal_voltage_switch Most things should go through sdhci-uhs2 but not nessarily everything.