mmc: Add missing MMC_HS400_ES_SUPPORT to mmc_set_card_speed
PATCH v2 1/1 mmc: Add missing MMC_HS400_ES_SUPPORT to mmc_set_card_speed
mmc_select_mode_and_width() already passes true for the hsdowngrade parameter when the bus mode is HS400-ES. However, mmc_set_card_speed() only checks MMC_HS400_SUPPORT in that branch, and if (hsdowngrade) never checks the mode itself. Add MMC_HS400_ES_SUPPORT so the downgrade path also applies to HS400-ES.
---
Changes for v2:
- drop the dw_mmc: prefix; the change is in generic mmc.c
- mention mmc_select_mode_and_width(), which already passes true for HS400-ES
- clarify that if (hsdowngrade) does not check the mode
drivers/mmc/mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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 * to HS mode, the card clock are still running much faster than
Signature · 1 line
2.34.1
Hi Liu,
Thanks for incorporating the feedback. Also, you don't need to send multiple patches; it takes some time for them to sync and show up under Patchwork.
Quoted 6 lines · baozhu.liu
mmc_select_mode_and_width()already passes true for the hsdowngrade parameter when the bus mode is HS400-ES. However,mmc_set_card_speed()only checksMMC_HS400_SUPPORTin that branch, and if (hsdowngrade) never checks the mode itself. AddMMC_HS400_ES_SUPPORTso the downgrade path also applies to HS400-ES.
Quoted 8 lines
Signed-off-by baozhu.liu <[email protected]>---
Changes for v2:
- drop thedw_mmc: prefix; the change is in genericmmc.c
- mentionmmc_select_mode_and_width(), which already passes true for HS400-ES
- clarify that if (hsdowngrade) does not check the mode