All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip signal_voltage_switch()
@ 2020-07-10 11:11 Ben Chuang
  2020-08-21 14:09 ` Adrian Hunter
  0 siblings, 1 reply; 11+ messages in thread
From: Ben Chuang @ 2020-07-10 11:11 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson
  Cc: linux-mmc, linux-kernel, ben.chuang, takahiro.akashi, greg.tu,
	Ben Chuang

From: AKASHI Takahiro <takahiro.akashi@linaro.org>

sdhci_start_signal_voltage_switch() should be called only in UHS-I mode,
and not for UHS-II mode.

Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-09-17 10:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 11:11 [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip signal_voltage_switch() Ben Chuang
2020-08-21 14:09 ` Adrian Hunter
2020-09-14  6:40   ` AKASHI Takahiro
2020-09-14  8:08     ` Adrian Hunter
2020-09-15  6:03       ` AKASHI Takahiro
2020-09-15 11:36         ` Ben Chuang
2020-09-16  0:52           ` AKASHI Takahiro
2020-09-16  9:42             ` Ben Chuang
2020-09-17  0:56               ` AKASHI Takahiro
2020-09-17 10:52                 ` Ben Chuang
     [not found]         ` <bd394015-abb7-f134-c883-ec28b42f1fc5@intel.com>
2020-09-16  6:24           ` AKASHI Takahiro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.