From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 359A2E92711 for ; Fri, 6 Oct 2023 10:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231834AbjJFKvR (ORCPT ); Fri, 6 Oct 2023 06:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbjJFKvO (ORCPT ); Fri, 6 Oct 2023 06:51:14 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0CD783; Fri, 6 Oct 2023 03:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696589473; x=1728125473; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Debr6U/oJdxI33pRy4gxgYMy4vatAy9uxPfOkwc3jvk=; b=OF8YD5u5K4FP6QOe6sQCfz5aYeem+fFPmSMWBe4zmX8VqesA9rxa5T4w BsuPYfBW+nU9e2Qa2OJzrBqag7ab59fB3PFaAokPONw5Rguj2HLrUE08a 2S57m4wCm1z6sS5OIDRDS+p33ZFJfy8RIooiCoxYV4TMTHeamUDQ+VB0i 0s7HAtSJfhNQxZH0ayHEHFO0usOOo8nh+QS00xGwNCHzz8P2KIioIdCbV F5AvbyfiUNSv4zmNBfWuXBla5CAxVb0P2gT4y83Njy93P9c+QXNHCosuY OJt1lRq5fGhYx4HNeU1sE/f6cT7kcwum0SE9/BvkwzcYhVvAJZy7ED7Go g==; X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="450220641" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="450220641" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 03:51:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="1083411636" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="1083411636" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.41.64]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 03:51:04 -0700 Message-ID: <8c80f712-45c3-4c7a-a694-11efa4591078@intel.com> Date: Fri, 6 Oct 2023 13:50:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V12 12/23] mmc: sdhci-uhs2: skip signal_voltage_switch() To: Victor Shih , Ulf Hansson Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw, Greg.tu@genesyslogic.com.tw, takahiro.akashi@linaro.org, dlunev@chromium.org, Ben Chuang , Victor Shih References: <20230915094351.11120-1-victorshihgli@gmail.com> <20230915094351.11120-13-victorshihgli@gmail.com> Content-Language: en-US From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/10/23 13:30, Victor Shih wrote: > On Tue, Oct 3, 2023 at 5:58 PM Ulf Hansson wrote: >> >> On Fri, 15 Sept 2023 at 11:44, Victor Shih wrote: >>> >>> From: Victor Shih >>> >>> For UHS2, the signal voltage is supplied by vdd2 which is already 1.8v, >>> so no voltage switch required. >> >> Can you please elaborate on this? I don't get anything of the above, sorry. >> >>> >>> Signed-off-by: Ben Chuang >>> Signed-off-by: AKASHI Takahiro >>> Signed-off-by: Victor Shih >>> Acked-by: Adrian Hunter >>> --- >>> >>> Updates in V5: >>> - Use sdhci_uhs2_mode() to simplify code in >>> sdhci_uhs2_start_signal_voltage_switch(). >>> >>> --- >>> >>> drivers/mmc/host/sdhci-uhs2.c | 24 ++++++++++++++++++++++++ >>> 1 file changed, 24 insertions(+) >>> >>> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c >>> index fc37a34629c2..92fb69b7e209 100644 >>> --- a/drivers/mmc/host/sdhci-uhs2.c >>> +++ b/drivers/mmc/host/sdhci-uhs2.c >>> @@ -142,6 +142,27 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, un >>> } >>> } >>> >>> +/*****************************************************************************\ >>> + * * >>> + * MMC callbacks * >>> + * * >>> +\*****************************************************************************/ >>> + >>> +static int sdhci_uhs2_start_signal_voltage_switch(struct mmc_host *mmc, >>> + struct mmc_ios *ios) >>> +{ >>> + struct sdhci_host *host = mmc_priv(mmc); >>> + >>> + /* >>> + * For UHS2, the signal voltage is supplied by vdd2 which is >>> + * already 1.8v so no voltage switch required. >>> + */ >>> + if (sdhci_uhs2_mode(host)) >>> + return 0; >> >> This is just wrong. If we are initializing a uhs2 card, we certainly >> should call ->start_signal_voltage_switch() callback at all. This is >> for UHS-I cards, right? >> > > Hi, Ulf > > UHS-II does not need single_voltage. > I will modify the commit message in the next version. > sdhci_uhs2_start_signal_voltage_switch() is under > mmc_host_ops.start_signal_voltage_switch host ops, > therefore, we need to keep the UHS-I path here. You should be able to leave out the patch entirely because ->start_signal_voltage_switch() is not called for UHS2 mode > > Thanks, Victor Shih > >>> + >>> + return sdhci_start_signal_voltage_switch(mmc, ios); >>> +} >>> + >>> /*****************************************************************************\ >>> * * >>> * Driver init/exit * >>> @@ -150,6 +171,9 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, un >>> >>> static int sdhci_uhs2_host_ops_init(struct sdhci_host *host) >>> { >>> + host->mmc_host_ops.start_signal_voltage_switch = >>> + sdhci_uhs2_start_signal_voltage_switch; >>> + >>> return 0; >>> } >>> >> >> Kind regards >> Uffe