diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 0de222c75aa5..7ba6c5515d21 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -479,6 +479,16 @@ int mmc_retune(struct mmc_host *host) host->ops->prepare_hs400_tuning(host, &host->ios); } + /* + * Timing should be adjusted to the HS400 target + * operation frequency for tuning process. + * Similar handling is also done in mmc_hs200_tuning() + * This is handled properly in sdhci-msm.c from msm-5.4 onwards. + */ + if (host->card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400 && + host->ios.bus_width == MMC_BUS_WIDTH_8) + mmc_set_timing(host, MMC_TIMING_MMC_HS400); + err = mmc_execute_tuning(host->card); if (err) goto out;