Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp283074rdb; Fri, 6 Oct 2023 03:30:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwQvjb4Tby0vHNRS5X5DQWAy0KeY9WV3gXKnX/cHwi7KvLzKAZ8cNkeqZch4FFbRWTn2kL X-Received: by 2002:a05:6a00:2315:b0:692:780a:de89 with SMTP id h21-20020a056a00231500b00692780ade89mr8864828pfh.33.1696588253452; Fri, 06 Oct 2023 03:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696588253; cv=none; d=google.com; s=arc-20160816; b=T20HHqEE/6lPpdRLuSNn21k+XEwBHZoTHTm18ErzlK0pU8FAmmb7kDLrh7hGjFE9UH k2uKPROXEETmL4IIIKcr/J+3UdnAXpbdLVYx6t9Nv70h1L5E5kbn83xxe7AENrRHuQSY QGsDV49xNg7yPoH9P46YGlFLGzXu0YTYDw/duWJ//F7yl43LF9sQT1OZBv5rGiXaYPHG 1BtMg35HiXBkTljzoLtIRuDt1h8UMUin6RlnNDRjhHgNBBUqPgN8YRDShMZrBvg+TE46 C0xLmbG7e2uNZ1LnJ8HVBSYZR8fAuMubD5G0dox8izwV/tFL6Sq3+K0sWEsM0qn7d1WS AuFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+TgLZiI7aDgS25qRr3woiF/RYIv1V3MyNXKdAtoU2Rk=; fh=E9dRX3P9+1ACoiVN3TLqgt71N7WLrYiSbf3DtPzMktQ=; b=uHMZTefYlBOIcUhIv+GADzj8XoJLFx8+NF37XgyZINWaY5rhes7oFHLPKX5q4WxjU5 CZYQsc+003PGtPOjqUqTC7ZPowuy2VnvC4zV1Fs2eWVDs/nKlO9AJAb96lPeZ/30jpXN 7wKAJ869ZZ67PNu1xfbMCpdKrWwVR5eqFY+ik/QYwaC6h1gReYdN/s5cuTFyjmxb9iKh vhpsGf3bGvT7chNUsSLKXnsFwp9WkCIdP3BoqNeyXgZSku/C5SVLrMstx/QToMY/AIGM mUFbrtNOla42PUMpi9+tqUQ0FXvop+mYdm9mgXBMdhKmvfOeEDtD144YuBugehlOSQLE F7+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="RPz/o3Kj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id dw6-20020a056a00368600b0068ace3816d7si1198064pfb.387.2023.10.06.03.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:30:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="RPz/o3Kj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 29EC7801C022; Fri, 6 Oct 2023 03:30:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231776AbjJFKac (ORCPT + 99 others); Fri, 6 Oct 2023 06:30:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231782AbjJFKaa (ORCPT ); Fri, 6 Oct 2023 06:30:30 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC492FF; Fri, 6 Oct 2023 03:30:28 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-7abda795363so832060241.0; Fri, 06 Oct 2023 03:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696588227; x=1697193027; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+TgLZiI7aDgS25qRr3woiF/RYIv1V3MyNXKdAtoU2Rk=; b=RPz/o3KjBAUk6YMCjTxZrmIeT8MA43uBnAXDO5UrSGra6nCJ8zlyMi+znOmf1Mv5FD h9mH2C1kL13hThCh/vXGcJkS8IteUidYBwbATgpQDdbijgaaLuMjl8P5xbg1mUHeFu0M zIdsQuGnz4zi7AegHAH8ZifllTwp5Zbqxv1rpwp+ii32C3bkcMwQ4paFTt8CS9e9B53r 7kCfX8lcnlqcp6c8F0/6DaGaFsev7tmIeIsd5dfB4SzdEecyPMGWMCtvOKM1Zf7BXZxp NLb26CXe/feDZnJV0oRI9KJqTZ2hujHS+dCyAi94I37Zb+oTBdYm94tGCvxbGNDwzRbI h46g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696588227; x=1697193027; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+TgLZiI7aDgS25qRr3woiF/RYIv1V3MyNXKdAtoU2Rk=; b=CUDXNEbly+tA5zNpAe1iKX+Dbm0zTKn+w33tGCbMG3aEQgu2tn2T89bPL9XW6wK32n 183DXUkUL7yLeJVWLLnPMp6rhyCQgMO9wxCPB6/qF3oG/OdS4fM2GDinrtH2B8swdVkk G5gBTWnfyLY6p6/+nVb2xqUcMDscpwlpPmjt+GhgIsCTgDM/KZP+XXGsO8FqpPmKFPdb JkLykwfPuMj9bPArP96Uhuph6dcSW9U0z+DPE6ZHiD4P08XRcrjoBVuTGiWM9qMTsy97 JK//ycTEnZ+hi3qK1eUQsEqIUnGJlGKFZayrUUPJcfq8aY+GWzY9Q8sTm59g1MuUQ/g1 2k8Q== X-Gm-Message-State: AOJu0Yw65SHf+p1eKTcuQ33G37lZxPZiHGIlZDuuqRQpADTVaT9yfUws 6miRoPfke2TT1WDAQhj2bXS+kNR+52JKhWKlMDQ= X-Received: by 2002:a1f:e246:0:b0:499:dec9:e1a8 with SMTP id z67-20020a1fe246000000b00499dec9e1a8mr6919423vkg.14.1696588227573; Fri, 06 Oct 2023 03:30:27 -0700 (PDT) MIME-Version: 1.0 References: <20230915094351.11120-1-victorshihgli@gmail.com> <20230915094351.11120-13-victorshihgli@gmail.com> In-Reply-To: From: Victor Shih Date: Fri, 6 Oct 2023 18:30:13 +0800 Message-ID: Subject: Re: [PATCH V12 12/23] mmc: sdhci-uhs2: skip signal_voltage_switch() To: Ulf Hansson Cc: adrian.hunter@intel.com, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 03:30:49 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 3, 2023 at 5:58=E2=80=AFPM Ulf Hansson = wrote: > > On Fri, 15 Sept 2023 at 11:44, Victor Shih wrot= e: > > > > 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, sorr= y. > > > > > 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-uhs= 2.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 =3D 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. 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 =3D > > + sdhci_uhs2_start_signal_voltage_switch; > > + > > return 0; > > } > > > > Kind regards > Uffe