Skip to contentSkip to conversation

mmc: dw_mmc: Add the missing MMC_HS400_ES_SUPPORT to mmc_set_card_speed

PATCH Superseded baozhu.liu 2 participants 2 messages Sep 21 MMC, SD and SDIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

baozhu.liu

author
#0 lore raw

PATCH 1/1 mmc: dw_mmc: Add the missing MMC_HS400_ES_SUPPORT to mmc_set_card_speed

In the mmc_select_hs400es function, mmc_set_card_speed(mmc, MMC_HS, true) is executed.
The third parameter is set to true, but the judgment branch for the hsdowngrade parameter does not include MMC_HS400_ES_SUPPORT.

---
 drivers/mmc/mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/mmc.c +2 -1
index 670e92ee12b..2bc36c1405c 100644
@@ -1007,7 +1007,8 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode,
 		return err;
 
 #if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
-    CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+	CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) || \
+	CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
 	/*
 	 * In case the eMMC is in HS200/HS400 mode and we are downgrading
 	 * to HS mode, the card clock are still running much faster than
Signature · 1 line
2.34.1
#1 lore raw

HI Liu,

This is generic mmc.c, not dw_mmc.

Quoted 2 lines · baozhu.liu

In the mmc_select_hs400es function, mmc_set_card_speed(mmc, MMC_HS, true) is executed.

Also mention |mmc_select_mode_and_width()|, which already passes |true| for HS400-ES.

Quoted 2 lines

The third parameter is set to true, but the judgment branch for the hsdowngrade parameter does not include MMC_HS400_ES_SUPPORT.

Not a missing runtime if case - if (hsdowngrade) never checks the mode. Modify the message.

Quoted 10 lines
---
  drivers/mmc/mmc.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/mmc.c +0 -0
index 670e92ee12b..2bc36c1405c 100644

drivers/mmc/mmc.c static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode, · line 1013

Quoted 8 lines
drivers/mmc/mmc.c +2 -1
@@ -1007,7 +1007,8 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode,
  		return err;
 
  #if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
-    CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+	CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) || \
+	CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
  	/*
  	 * In case the eMMC is in HS200/HS400 mode and we are downgrading

Update this comment to mention HS400-ES as well.