From patchwork Fri Mar 31 10:55:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Shih X-Patchwork-Id: 77738 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp479265vqo; Fri, 31 Mar 2023 04:09:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aI4fQNQoDncoAKany7YYTcCunFYIv6YUrbPBb40YrCNmB0tWUH6foti4NywkBqIx3m4nnP X-Received: by 2002:a17:903:2289:b0:1a1:a5ac:29ba with SMTP id b9-20020a170903228900b001a1a5ac29bamr34677672plh.1.1680260998898; Fri, 31 Mar 2023 04:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680260998; cv=none; d=google.com; s=arc-20160816; b=KeVBJ3YlCc5Kb3+zpARNiJokix0HsSBZeac0qLKSu2C5/7u3W0w2p8UmKF0rLsVyf9 suY4MKWNh/jlcybS+wOoTkDUhdY+8cS7POhlgB+C0aF61QrATt3V3LJ3H045xXD5Cx9j FQeluXInrEgrALhpWtetgBPpB/sH9wXkqH0tRxVs5swOZn/KPKvxtxDVnSA/Y9S1kxVL pyr0eu50NBSANU2C5h9MLQWhHUhPTAQLLT++9A8+70IUnXP9VLliDbLCBLU6QaBdpOu8 or6DKF5bvLZqCL4W5QX22Hfpu8PV1kPJ/X2o5XNNX4c2RxdG8SK9i3YT4dm2binOSO3o vltA== 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=3SMQ46G8IRFQna3g+4B67sNj9wZf4cksdhNQ4IUcuW4=; b=I9a7KrtXow2uxnJ8hKDE6NiF0kEkSWoo9iSssKjwnRLerlEJq1zuRnqg1CI1qp0xpJ dH3HXcvxtU8bYR5jVV+PZd3Z5A5yDllKhMcSSNYizU7S/74T/wIcOd3h0GdbQ8aXfH6l p0ALsiFM8bt5hU2vu5SR09wjbkG9/aCmmiAyGhs8hy/qxgEhNVHPuL8tN6WqpjlecRwH eVSg1VpO6SCINmCkMLPUw9t+pXjHaQNhwQY39Xt7yuNh3PStaJHze0SLzziMzYkrdMm+ 2Be397649FhG+vHw9aSjBcitaAxEo8VT2mxm68poePS2mhEUJJhz2924LZJI4hcnlmEI hcpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fX6Lk+BZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a6557ce000000b005073e3342eesi2113004pgr.143.2023.03.31.04.09.47; Fri, 31 Mar 2023 04:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fX6Lk+BZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231964AbjCaK6B (ORCPT + 99 others); Fri, 31 Mar 2023 06:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231814AbjCaK4y (ORCPT ); Fri, 31 Mar 2023 06:56:54 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 855E11DFB2; Fri, 31 Mar 2023 03:56:38 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so22961153pjz.1; Fri, 31 Mar 2023 03:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680260198; 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=3SMQ46G8IRFQna3g+4B67sNj9wZf4cksdhNQ4IUcuW4=; b=fX6Lk+BZ2iQGVeeWcpYCgL6buScSfsomo/VT9UiB3OraK0hYkzgQR5/VCi2Vq1pqyY ZRa5t3MdvPpKsBk8H1cW2QnqaTl9icu8tR7nMsMm85HLOfB2bXv1tONgGrYaujnCOCaL 1Agi8+gBOSXKGPq8W9K4H3aEAMkBNf/04UrduOPkpRomXKGlw7lN3bF+IDbEgSQFmsx5 PreEhJMkw6N4vnzVhhFvnSajBT+s0VNzilC/t+ND/QZ9ktiHiLneBZ7cOb6u2x4k3iJC yS0Id9irHqVAzko2NjcP0aLtMch2WcU0WiTjT6eZnXnyRB/t+0s6y5Y5bcr/M2YfNOfQ lV3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680260198; 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=3SMQ46G8IRFQna3g+4B67sNj9wZf4cksdhNQ4IUcuW4=; b=Q+ArwnLPOerVnzAOdLnv4fxGHc/uplolu9Xzwq9DBJfDcixrj3ARx63pEQhyXHwyTK Fm5LX3l0nTeUYnhzejbcOByfQkjC27G5Qll6mxH4U2StmshsiL3dLdXysKZvXO07qAWX 7prfPSr7yBRhycYXJVN878zQ1YNtK9UQloQIX7lqxLHuWE+3DlzRay8xoIm3wy8J2U59 Kpo+N7j5Z/eMJPLqbkDfyzeW6TVqJpSOYojsDsO5+sR3pfiyza7bwBcq6zyEO0RPLhBx QQLI3LZhvxZfw2fSTibl/je0lYCLxIVyX5BHtXDYaiz08Pfklmun8i+/edsMtD5U1siY 1SwA== X-Gm-Message-State: AAQBX9crP4ij1t7SwIIrMdyAL5Aq8oGSeOJDS2vF6G3RxBAKuWQpbMYl 2Z5PGGj+GbkdSWI8+mKS38QoVNjstmw= X-Received: by 2002:a17:902:e0c5:b0:1a0:6eb4:3871 with SMTP id e5-20020a170902e0c500b001a06eb43871mr21529970pla.20.1680260198024; Fri, 31 Mar 2023 03:56:38 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e25c-983f-c7ff-3efd-77d9-6c16.emome-ip6.hinet.net. [2001:b400:e25c:983f:c7ff:3efd:77d9:6c16]) by smtp.gmail.com with ESMTPSA id f19-20020a170902e99300b0019acd3151d0sm1287665plb.114.2023.03.31.03.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 03:56:37 -0700 (PDT) From: Victor Shih X-Google-Original-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 Subject: [PATCH V7 12/23] mmc: sdhci-uhs2: skip signal_voltage_switch() Date: Fri, 31 Mar 2023 18:55:35 +0800 Message-Id: <20230331105546.13607-13-victor.shih@genesyslogic.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230331105546.13607-1-victor.shih@genesyslogic.com.tw> References: <20230331105546.13607-1-victor.shih@genesyslogic.com.tw> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761881357024073965?= X-GMAIL-MSGID: =?utf-8?q?1761881357024073965?= 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 --- 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 3f232f4e0820..388d87537847 100644 --- a/drivers/mmc/host/sdhci-uhs2.c +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -144,6 +144,27 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, } } +/*****************************************************************************\ + * * + * 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 * @@ -152,6 +173,9 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, 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; }