Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp423798rdb; Fri, 17 Nov 2023 02:51:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHY9hBY62KCgm/J1xbcXXeVRdk2JnWZX3oFcV18QNuW3ZYbKVPRPwv05CFmj/mZCEh9ud4i X-Received: by 2002:a05:6a20:6a07:b0:187:89aa:68d7 with SMTP id p7-20020a056a206a0700b0018789aa68d7mr7926718pzk.38.1700218294698; Fri, 17 Nov 2023 02:51:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700218294; cv=none; d=google.com; s=arc-20160816; b=mbCiODqljCANj/IdyNPoSKAHRl3MSEdir5csv+pA37B2x4vdhGmW2RAGNQJcIdg2SA nGD97LqmOIt5cL+QAse8zKs21vjfTKXblzj/ey8sVeG+VITIxf56PI3dauJqEqqsqwFS 1EskuQeqt2cKgOycSRmwxlSuaRLDsojP/V0q8WIJlVRpQaMDw6fEyHhK1T4fUK3kEthS tjTOg/Do0D917npmnfL9HvUVTcpkJwmIb4LEwIUGIQD8QvuY75uRV5rEEpppWdl46Gm1 lIlfGaqRpX9eImy5oHlxRdDeUlj3m/CGk2c+oGJC7nyVrcorgvhE0t9Wgz+2slBNiFCt L+lA== 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=mROOgsQBSA4v7sWhPVDYljNSnT+02Uiataq87rTSwgs=; fh=6vLalc8Vayli1Qb5Ez2EzmkfmgakdKOnZnyIGZYFok8=; b=ZTUUP6yyWt3Vdrmol+fkbdoSzoz9T1e3itRfEZUl26fsZl7TaljTy4QnkKrxxkB+Zv DSoaHEcu2IG7JM4s3f3TtIsBK9T8Jnz6Mvi3BFEiEyqyGCrpJxOPsNOM03evXWfzQB2T VA26T/Ba+4eiul9R8aPC3+8QVuqyitD1s/SRnffgGPH+PIdoZIhJkAhdzKeb2Ovdf6C3 UIJk2sIf8OkgZwpveDhI9qpl5XNux9JZ8Cbf5ZHrcAfsskK64okzlo71/ecKn8ejSzL6 tX7kK7nr98+7QTRxEV11HcNIgg8R0+Aobko+TS32uot3wsDGJTbUwjsASZzNpOA0e6sP IlNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F6UX2Zma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c15-20020a170902d48f00b001c60636e426si1651649plg.432.2023.11.17.02.51.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 02:51:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F6UX2Zma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 65288806502B; Fri, 17 Nov 2023 02:50:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345973AbjKQKuQ (ORCPT + 99 others); Fri, 17 Nov 2023 05:50:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345977AbjKQKuO (ORCPT ); Fri, 17 Nov 2023 05:50:14 -0500 Received: from mail-ua1-x934.google.com (mail-ua1-x934.google.com [IPv6:2607:f8b0:4864:20::934]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FEA5D4F; Fri, 17 Nov 2023 02:50:10 -0800 (PST) Received: by mail-ua1-x934.google.com with SMTP id a1e0cc1a2514c-7be55675503so724690241.1; Fri, 17 Nov 2023 02:50:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700218209; x=1700823009; 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=mROOgsQBSA4v7sWhPVDYljNSnT+02Uiataq87rTSwgs=; b=F6UX2ZmaaJKraf5q5o9ME106twgcGKFs2xq7W74JrLF3/vM+vWCPZffy0UBAwizxbN yWNatetafmrxz5lwR1tEkx11k5xZnEcLixIMTq7VxmWa8gl63T2c/hWkpySGxj0o9rHG LtyCNhULIxUYngqOvEXZFc8wE4INdrkGSxoBZG8OJQAHS0ZKoXgQ0tNk85En/Fb1aDUQ LG41DoeYlmkWg3isGwkvPLfG+HzISd9z0ayohJaDZUEyMjjdCM/y6FuRvcUTnUnVWXE9 nSuF5PbEk7pWBwG4itR//7b+1FWBCEGLmgGs9AEXhmJgsvqqeIKfKUKqwWkFTRoyRpE0 wB+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700218209; x=1700823009; 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=mROOgsQBSA4v7sWhPVDYljNSnT+02Uiataq87rTSwgs=; b=bIyoMGfPrtMa2j8Jv/KRYF+doRFBCxt2Xd2seIEfllBzf0vqEXKivSYG6Be91rlwDw KeXaXIQujnTvm9KZni7OTCFVf3ahG6ev7KBZ/UupJqnFRBHYTmaEOdEqDzpiQHJ//azR fEgBoZjhG/HA3efHhPF04gWCj/eeXvA5sQG2KSOGGns8y1UBpIzRXoQNerbQtA6OIljp g08AZDjDD6SXK7Kb7b6XdaG6E1p4fW063zYvtO54/yFC/8rKo09Im3oFY5074jttVsGo Dic+IrMAFd4Qny8YUKdKwbcGErE7VupdbYKd428a69tSoiQs6HsG13Sc5RBmw4d09RnF 7laA== X-Gm-Message-State: AOJu0YwX7Q7HOwPyNnJJRr451Wl7BDS7RqW4h8GNRHZ03Dq/6La9S1jn Rpn/wJy1tJKxOm3dzHzsEj1H5lqI+Y4pVXZNY4o= X-Received: by 2002:ac5:ccc7:0:b0:495:febd:9187 with SMTP id j7-20020ac5ccc7000000b00495febd9187mr18891593vkn.0.1700218209412; Fri, 17 Nov 2023 02:50:09 -0800 (PST) MIME-Version: 1.0 References: <20230915094351.11120-1-victorshihgli@gmail.com> <20230915094351.11120-13-victorshihgli@gmail.com> <8c80f712-45c3-4c7a-a694-11efa4591078@intel.com> In-Reply-To: <8c80f712-45c3-4c7a-a694-11efa4591078@intel.com> From: Victor Shih Date: Fri, 17 Nov 2023 18:49:57 +0800 Message-ID: Subject: Re: [PATCH V12 12/23] mmc: sdhci-uhs2: skip signal_voltage_switch() To: Adrian Hunter Cc: Ulf Hansson , 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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, 17 Nov 2023 02:50:52 -0800 (PST) On Fri, Oct 6, 2023 at 6:51=E2=80=AFPM Adrian Hunter wrote: > > On 6/10/23 13:30, Victor Shih wrote: > > On Tue, Oct 3, 2023 at 5:58=E2=80=AFPM Ulf Hansson wrote: > >> > >> On Fri, 15 Sept 2023 at 11:44, Victor Shih w= rote: > >>> > >>> From: Victor Shih > >>> > >>> For UHS2, the signal voltage is supplied by vdd2 which is already 1.8= v, > >>> so no voltage switch required. > >> > >> Can you please elaborate on this? I don't get anything of the above, s= orry. > >> > >>> > >>> 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-u= hs2.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_ho= st *host, unsigned char mode, un > >>> } > >>> } > >>> > >>> +/*******************************************************************= **********\ > >>> + * = * > >>> + * MMC callbacks = * > >>> + * = * > >>> +\*******************************************************************= **********/ > >>> + > >>> +static int sdhci_uhs2_start_signal_voltage_switch(struct mmc_host *m= mc, > >>> + 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. > > You should be able to leave out the patch entirely > because ->start_signal_voltage_switch() is not called > for UHS2 mode > Hi, Ulf and Adrian I will drop this patch in version 13. Thanks, Victor Shih > > > > 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_hos= t *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 >