summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2021-08-17 12:20:34 +0300
committerPeng Fan <peng.fan@nxp.com>2021-09-10 13:17:49 +0300
commitfb8c2e8fa936f8ebe4b7cc822abe33ff620585cd (patch)
treef35f467f6a5735517d5d1bc400633c998c8093b5 /drivers/mmc
parent3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3 (diff)
downloadu-boot-fb8c2e8fa936f8ebe4b7cc822abe33ff620585cd.tar.xz
mmc: fix device_remove when HS400_ES is enabled
HS400_ES is missed when down grade to HS mode during device_remove the mmc device Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 6f767cbd63..d3babbfeb1 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2092,14 +2092,16 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
}
#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, downgrade to HS mode
* before doing anything else, since a transition from either of
* the HS200/HS400 mode directly to legacy mode is not supported.
*/
if (mmc->selected_mode == MMC_HS_200 ||
- mmc->selected_mode == MMC_HS_400)
+ mmc->selected_mode == MMC_HS_400 ||
+ mmc->selected_mode == MMC_HS_400_ES)
mmc_set_card_speed(mmc, MMC_HS, true);
else
#endif
@@ -2970,7 +2972,7 @@ int mmc_deinit(struct mmc *mmc)
return sd_select_mode_and_width(mmc, caps_filtered);
} else {
caps_filtered = mmc->card_caps &
- ~(MMC_CAP(MMC_HS_200) | MMC_CAP(MMC_HS_400));
+ ~(MMC_CAP(MMC_HS_200) | MMC_CAP(MMC_HS_400) | MMC_CAP(MMC_HS_400_ES));
return mmc_select_mode_and_width(mmc, caps_filtered);
}