diff mbox series

[RFC,v3.2,03/29] mmc: core: UHS-II support, skip set_chip_select()

Message ID 20210722040124.7573-3-jasonlai.genesyslogic@gmail.com
State New
Headers show
Series [RFC,v3.2,01/29] mmc: add UHS-II related definitions in public headers | expand

Commit Message

Lai Jason July 22, 2021, 4 a.m. UTC
mmc_set_chip_select() should be called only in UHS-II 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/core/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--
2.32.0
diff mbox series

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 722b61811f1e..3da7b7e321a0 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -899,8 +899,10 @@  static inline void mmc_set_ios(struct mmc_host *host)
  */
 void mmc_set_chip_select(struct mmc_host *host, int mode)
 {
-	host->ios.chip_select = mode;
-	mmc_set_ios(host);
+	if (!(host->flags & MMC_UHS2_INITIALIZED)) {
+		host->ios.chip_select = mode;
+		mmc_set_ios(host);
+	}
 }

 /*