Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4726816rdb; Fri, 15 Sep 2023 10:20:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEffRnEPDA+FWdmZCfgfOZ4s8+6tVNnBqb1+IZ/iE8HuTzvSerTFTD5ny5C+Syq481RiHE3 X-Received: by 2002:a05:6a00:23d1:b0:68a:3b39:a486 with SMTP id g17-20020a056a0023d100b0068a3b39a486mr2490511pfc.24.1694798437094; Fri, 15 Sep 2023 10:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694798437; cv=none; d=google.com; s=arc-20160816; b=cJMDGjxsD+aoVl05UYfb3rWKkrnV5Qq7LsRvWTGraj2shI4+qh26m/koe5DBnU/U83 Hyu7d5dW/roFie4Pb28QKeZW95ztxzpPb4s/qm1m/CiamyRqKxvdWcUPmPKLWVHEbh/9 J5ksF4OCIeTkWTOpQRZTT39BN5eynjbw6MiCo/Mw0iPzqZzHiuWqK5HG1vct20ZXf1PU /g4hOEJmyi57umLlSJtu9PB0OCKFgRi6j6dqxUwaHbhfzM3CIzcDh2Q4wDE8AwsdyMSf 4xG1Vo/4X++94MmLyCWkt79XexhfOJyANVGzbfTyYz2DGOr1hWDelSMndbs5ncM3CF/A LpMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ei7XNMDznm4gQAPUvGl27pd9IQStOyHk63FGnzmJMW8=; fh=y5fk6vguAkbcel7KoRWpitGO8B8BpGYTQpzSdaI/dY4=; b=Jf/8DMs32TpTlXgvpN1+Re/IQed4g2EKq8ht1+Dm9oD3Fk80LNV9EnZs+Axg9liGN3 9/rCE7uX8ooYBQUxpavMMdRLyd4gOYC4c8WWQdxAcDEBFD4N3WCIf07/QSYiUztd46tX NQz+rCx8n59mJnMf7chGJMvhgNAVjPGtDPFmdis9uAQpzbebp0m9gdIOK0WL5MN4U5oo 6Dt7cFGyGvtRn2ZVn6i1qh9P8bTi2lAgcrFTgIiubtsgHvxO8zFWi2PWsWT3koEiFhsV 550+LK0gnUOXZl9VJIvNSzQ4GZlnQH7EZL+xDHZv6NUh/UWV3PS9/3LQ8TvF/DXTidM8 N52A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="XQ/QlW9x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m187-20020a6326c4000000b0056679c8e70csi3502228pgm.272.2023.09.15.10.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 10:20:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="XQ/QlW9x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id DEB93808E666; Fri, 15 Sep 2023 02:45:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233939AbjIOJpV (ORCPT + 99 others); Fri, 15 Sep 2023 05:45:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234035AbjIOJpI (ORCPT ); Fri, 15 Sep 2023 05:45:08 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13F702113; Fri, 15 Sep 2023 02:44:32 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2749b3e682aso351018a91.2; Fri, 15 Sep 2023 02:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694771071; x=1695375871; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ei7XNMDznm4gQAPUvGl27pd9IQStOyHk63FGnzmJMW8=; b=XQ/QlW9xzottiLbQOwEW3wQ9x4pZp1Sgrmxgqnw55W0//MlRKcpEIVXCZt1T+lFCYm 5B6mUC7rWiZfG6sMxpa8fQI8o2EFUklhn1go7hScLKeVRMd9T9kkxSq1gs4ydgtA2jWY TghRSSyzLXdtuErlOxpWuS2vpHIBB+CfoiqFt6a4xLdnRDiXMOFMKh7S4meQ3Vr6kpzX zYLCr0LoDHKGOItRtKPKioDTzMSX1uiPq8z3l4IUz8EIlK5b3lBtnZxkdZRfBjxBOL0e fxaqWhB2nx3ty4ZtAkbZH+51jOrbQW//emF5VXYjGpX49jnyergSZ5ohKmoSOfqK2so1 a7dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694771071; x=1695375871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ei7XNMDznm4gQAPUvGl27pd9IQStOyHk63FGnzmJMW8=; b=dxIH+p7141BktG0a111Wcw0/EdCN2rbJfbAagOS3wHLrmWE7mRsXdo3Y3a++7YrWvc kvdlPuH9I+poek8IttbCfUAVgcyGSOuvuzCN5Y0zORlsZ37XayTKrgF16sMH8f/+vvqV 16n6GzGiFj/TJEbk7Q57bhL4eF83P/QtJ8fQTxKiOB6kFFc3lCTQ0CCd3CY7/FIvSDJL ToGyKXq2PUnkkk/J43aiVYbT/cVNesBA9mKtfaGU6TfvUCiIPvMlI5X7j0zTLNGwTWnJ zJDC95X1B4w5TJghYfk4o2+OcgqIiQd7eUbgpYHWnMdiEEx7o8iiiT6HJUorRWqsxNdq p4nQ== X-Gm-Message-State: AOJu0YykWJd5a18QhiVrUFZvDd8IMY809/90SO8xERyjr1hmBUjjWS2K 1T15OmeYpicyzjKDEaA5cwg= X-Received: by 2002:a17:90a:2f26:b0:26d:416a:d9d2 with SMTP id s35-20020a17090a2f2600b0026d416ad9d2mr932358pjd.45.1694771071545; Fri, 15 Sep 2023 02:44:31 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e2a6-6d77-d32f-f490-6688-3d32.emome-ip6.hinet.net. [2001:b400:e2a6:6d77:d32f:f490:6688:3d32]) by smtp.gmail.com with ESMTPSA id x4-20020a17090a530400b0025023726fc4sm4432794pjh.26.2023.09.15.02.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 02:44:31 -0700 (PDT) From: Victor Shih To: ulf.hansson@linaro.org, adrian.hunter@intel.com 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, Victor Shih , Ben Chuang , Victor Shih Subject: [PATCH V12 12/23] mmc: sdhci-uhs2: skip signal_voltage_switch() Date: Fri, 15 Sep 2023 17:43:40 +0800 Message-Id: <20230915094351.11120-13-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230915094351.11120-1-victorshihgli@gmail.com> References: <20230915094351.11120-1-victorshihgli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 02:45:39 -0700 (PDT) From: Victor Shih For UHS2, the signal voltage is supplied by vdd2 which is already 1.8v, so no voltage switch required. 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; + + 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; } -- 2.25.1