Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp450382ybt; Fri, 10 Jul 2020 04:11:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3eFGiUT7PZ+zaJmaKqwT3L6K0/QGvYKac6udO/gqkLTGCqXZp2cKmAtq21F9pHoL72Vih X-Received: by 2002:a05:6402:16c2:: with SMTP id r2mr24332170edx.127.1594379512674; Fri, 10 Jul 2020 04:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594379512; cv=none; d=google.com; s=arc-20160816; b=nXYkHIvZM5xK5d7aiH+tXTOjHhw5/eTI7hzLGIzSOFhfg6YIQDZDC4qNxl4SI3JQyW hyL4ZtHnUmlLo3NpJHF0TzWJnv9Uh5UR2HNO+bAEgz5JqT+/zWvQo4uC8lgXeHlXsjTs 7H5ea5m5846QIRylXVE5kIEINTGmN8051sY9S+XZ9JhVY8lLTx3BiF0ksJCao9ZIegnQ 8oz4YiaLdYaXIQZSYjIDhTfLcINNNziy6TYww3dsth1htWzZ9ZTuLncIgXvuMc3kqSRM HoD/874Let0RIj1AR/IR7qDPu4VNc4shKG6/39Uqz6j32oRrkYIkzsaezspRVpmMm9Is agrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dLfBKiqpz5EiKywgE0yB9WT/RYihQi2mbssOelfoHw0=; b=adoKvrsqnCPrCeGDLL+DpSEt3YNDxjvDjlpVxyD9w/gd4X/K2caRXIVmbA0skC6rAp nbachb0dpDZRvhecVqvfTZRzFUnHynck+BXXijeWaI4OI6hqfTTNd2QwW0dslAwrS55S C/lQhVVLSWt8ZqPxkvojCYHFiyRczRuSokpGLvMdhY4gaZqe2F9jWEPiJE5KsWeuwppV 36SXFr0gfJMxFA3lBp/ixS8obmzAyayfsNeKcdmrKPy2nwwuRyTvEO5aHOyR5PSM1jAL sIYwyr1BUExH2GfI1DwEIB6bB7tA322nLsf1QV6o51PAXFmr9WYXmInh4LgcqXix1Y+B 8O7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vJ9Ca77b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov7si3480697ejb.224.2020.07.10.04.11.29; Fri, 10 Jul 2020 04:11:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vJ9Ca77b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728066AbgGJLKW (ORCPT + 99 others); Fri, 10 Jul 2020 07:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbgGJLKV (ORCPT ); Fri, 10 Jul 2020 07:10:21 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C65BC08C5CE; Fri, 10 Jul 2020 04:10:21 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k5so2103219plk.13; Fri, 10 Jul 2020 04:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dLfBKiqpz5EiKywgE0yB9WT/RYihQi2mbssOelfoHw0=; b=vJ9Ca77bH7p0DulTZ4e770baRLuddEbRx8xicTWnfaG9DjxAag0yOPpVlm/VIAs+XQ oDQ8AxlewBO2CA6Fq8DuWbFoJwLrsN2eOB70y1kHApbj4tk220c8ZrYNHM3QZmQUlho7 3As2hgljt3suLKzCfO/LQEANVuOQqGj4wilxVHDlW+o7xSzyvTowXlFzyf+N2QJKtYwF zpozqSCTO4Z83+xjKmufmrX6Vlpukc7mh4JnB4Q5Y4syrSwNW/c+xuY1qVhRqPTEwT7Y coub31+cfdlaCmaCJlrP/bWTzeellUELCq2x2YuDpgSE2MW8tDHQZnF/QqnZbFdL9uGV ALpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dLfBKiqpz5EiKywgE0yB9WT/RYihQi2mbssOelfoHw0=; b=KuFJTQ44mA+ScLaWAE3WTpzo6wPVNrcQwgqPX9fM2J5MPxhLVszTpMLAu02HbLt5lm pOJlfEU4pLeVqr9c5sdqKl40/MqDkiVKGpEvonc/MFFPAwmaYkmJpBB93EIxWqPNg/+B etdxvwKQ9dggKI5pkSu1Hz2pLTW5gwr0ZqYJYEQ7wcY9cPP4Aan+G5s0OR3zIaV9QBTB OrFarOMwA13PYB9+I7a2rBhC2uCIpkGSp9JehnwiFh54631Am+UZ7YuZ0/0jR2GkPVXU Sj3L33HUeARxajPhvFN6BOueZUkn2GJ8TGaoRDHST0vm14rwDXkMjXIZ6KKh/w6unm2z 8xqQ== X-Gm-Message-State: AOAM531vlCs/t9tRgcoHOrueZvk4qjfUaGcOJAM+TZQ8z1y31HixDq5Z h4VfEPaUKApXC0mOftSVD5fu1JC9 X-Received: by 2002:a17:90b:3809:: with SMTP id mq9mr5026522pjb.156.1594379421083; Fri, 10 Jul 2020 04:10:21 -0700 (PDT) Received: from gli-arch.genesyslogic.com.tw (60-251-58-169.HINET-IP.hinet.net. [60.251.58.169]) by smtp.gmail.com with ESMTPSA id q5sm5617263pfc.130.2020.07.10.04.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 04:10:20 -0700 (PDT) From: Ben Chuang To: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, ben.chuang@genesyslogic.com.tw, takahiro.akashi@linaro.org, greg.tu@genesyslogic.com.tw, Ben Chuang Subject: [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip signal_voltage_switch() Date: Fri, 10 Jul 2020 19:11:04 +0800 Message-Id: <20200710111104.29616-1-benchuanggli@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: AKASHI Takahiro sdhci_start_signal_voltage_switch() should be called only in UHS-I mode, and not for UHS-II mode. Signed-off-by: Ben Chuang Signed-off-by: AKASHI Takahiro --- drivers/mmc/host/sdhci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 5511649946b9..7f2537648a08 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2623,8 +2623,13 @@ int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, /* * Signal Voltage Switching is only applicable for Host Controllers * v3.00 and above. + * But for UHS2, the signal voltage is supplied by vdd2 which is + * already 1.8v so no voltage switch required. */ - if (host->version < SDHCI_SPEC_300) + if (host->version < SDHCI_SPEC_300 || + (IS_ENABLED(CONFIG_MMC_SDHCI_UHS2) && + host->version >= SDHCI_SPEC_400 && + host->mmc->flags & MMC_UHS2_SUPPORT)) return 0; ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); -- 2.27.0