Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8052596rwb; Tue, 13 Dec 2022 01:14:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf53Ak4EFnpD4h5ble/lYOlQ26/gg12IcQcj0DED33KnaNNJUPTIu2s/Dme3AhtxjoLoVHME X-Received: by 2002:a17:903:442:b0:189:469c:dc0 with SMTP id iw2-20020a170903044200b00189469c0dc0mr17882396plb.7.1670922875067; Tue, 13 Dec 2022 01:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670922875; cv=none; d=google.com; s=arc-20160816; b=fphDK4blri1uRhBjcIsfrUzzaTPdIhRprSEbIFPdzs6MnIlG75cBeUdIt3F/iRnxnK Ovrhc5LxQ/HVhifumM2d2UkZCJyb3SuGcuKdJ6uD1/AzLAmkzh2SSJCfH7M0i9Jyi/13 lyjoCvm79WYkNf+LBSZv3ceJFdiRuRD0frxCzZPPbyjG9Lrt3YkXmm4AZtSeki8n1brN /slAqcoPx7sHJArZhFoK19GXzy2aE9qFFqqRUQU7WheKMjHM0WVJnNQpqhWIKY8KrkCe HBf+tjHJdd+Cb+BRtPq4++6mmJoxRpKRnbUOWdz7Hc4SlZYazN/fku+oYoPtRHGmIls4 szKg== 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=infOJYAuY6NmVdfocqokUhNUb9UCZ9ojC/z55HJcvas=; b=tS1kRgld/igcQ257x3LgyOAq1lEmapaCokr/pnM/1ZNDDFoneVJ5v9qCHaE4U+jhpe H4lTmHSO3flGZ3Rx9An7nXijgyJYpL2UDnt7QxHYdHGDkjvQANOCOEpqqmn1abHSbyMH 5uz5x1HFbUmB9429LJqSQTW75bde3J8WiCIHiahCtFWPti2fibk6O65COtqb0k99MJKW 0OlNK0UDfvkWBov/tfHbJPKTWBcDvMkVk1/lFZuDs357b0NJn+dVvW1HWRYtxaPBBOjR btip8Jf2v1f2qK/HPNYPRuhjeSyk5JDkdvU9z7rfKsGf8heyHixYBh9P6Ns8pLgyoSZq 0ZHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lnku68LJ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903244f00b0018bde2250f9si13512611pls.212.2022.12.13.01.14.25; Tue, 13 Dec 2022 01:14:35 -0800 (PST) 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=Lnku68LJ; 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 S234998AbiLMJDK (ORCPT + 74 others); Tue, 13 Dec 2022 04:03:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234989AbiLMJCE (ORCPT ); Tue, 13 Dec 2022 04:02:04 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7B26FD0B; Tue, 13 Dec 2022 01:01:47 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id 124so1775654pfy.0; Tue, 13 Dec 2022 01:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=infOJYAuY6NmVdfocqokUhNUb9UCZ9ojC/z55HJcvas=; b=Lnku68LJeyCc6DpE9eI2IZL7Ilekiby90qbRRR7Gpri22Fwd0J8AwJS2lx2iBFhqBH OH3ByCj9HPZ/SuBj5s/sSWgN96hkBAeP8dKXze5ptC28RRJf74CbdQqkOtbHAfWgmYFu 5s78L6qY56pJNotAMI7fBsBdW3te++9/M31Bvo9G9NnsxNRYi6P0m5jtBRJhwJCwW5Tv fRrIgE6mnDtK5bBWXxTTNGPVhxHmQc/eDRYggOh8azTWSnS6npHFy/MrEf5LSkrVDH31 GZz+lNr7gaGCTpBRg5FW94sSXiQstyuD37lrI6q6sLpOxyF+aTpvRv0bZZ91Fy8vMGlB Np7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=infOJYAuY6NmVdfocqokUhNUb9UCZ9ojC/z55HJcvas=; b=tfE5q0SQErcR4exlSfSmndPfYMwB/MHha0tnZibroXfA3TXnoCBkl8GJkxbFgHPJCQ ZQKq2IjV88dxknpB5MtjCEe4gEYO/A52oU5Rro4KlmYn8krd79PdH+Kn9CtWLDbWCvKv XCmNMFy09xqXH8VtG+FEsa3r2Voj+TWFLX3n5hiz2UzlDnLQ+iuaIDVVZl+frJ7Xylcn 9jzZfwwqq4vldmhNk/NZiK5GnL9MnHh7m+K0de8CshA6Iv/kSNWmRLf/DCxfF2bjw9mn 3rE11EcEa9VweNJDHKvhNq5NaUha/pFZvijtpBYBhLrFHSybeCU2c+IAsmuk5TXRuEnq hIEQ== X-Gm-Message-State: ANoB5pmMW8KS9AUXnqhCrEc3NmC9lQrEJFzX176uHZnY4N1PaJzaRXV2 fkoXT2xqhgLvjlTUaa/G1zQ4vjFxdgnTQw== X-Received: by 2002:a05:6a00:2787:b0:578:8864:7b24 with SMTP id bd7-20020a056a00278700b0057888647b24mr6416821pfb.12.1670922107172; Tue, 13 Dec 2022 01:01:47 -0800 (PST) Received: from localhost.localdomain (2001-b400-e2dc-5c03-264b-f684-a8c9-21ae.emome-ip6.hinet.net. [2001:b400:e2dc:5c03:264b:f684:a8c9:21ae]) by smtp.gmail.com with ESMTPSA id 81-20020a621954000000b0056b9ec7e2desm7141682pfz.125.2022.12.13.01.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 01:01:46 -0800 (PST) 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 V6 12/24] mmc: sdhci-uhs2: skip signal_voltage_switch() Date: Tue, 13 Dec 2022 17:00:35 +0800 Message-Id: <20221213090047.3805-13-victor.shih@genesyslogic.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221213090047.3805-1-victor.shih@genesyslogic.com.tw> References: <20221213090047.3805-1-victor.shih@genesyslogic.com.tw> 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_NONE,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 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 780491781613..2342c05c4cdb 100644 --- a/drivers/mmc/host/sdhci-uhs2.c +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -141,6 +141,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 * @@ -149,6 +170,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; } -- 2.25.1