From: Yangbo Lu Date: Tue, 1 Sep 2020 08:58:03 +0000 (+0800) Subject: mmc: add a hs400_tuning flag X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=8c96880814b23b5e17b5e7d350ea6066dae54bc6;p=u-boot.git mmc: add a hs400_tuning flag Some controllers may have difference between HS200 tuning and HS400 tuning, such as different registers setting, different procedure, or different errata. This patch is to add a hs400_tuning flag to identify the tuning for HS400 mode. Signed-off-by: Yangbo Lu --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 0727505304..b75c2bc830 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1982,7 +1982,9 @@ static int mmc_select_hs400(struct mmc *mmc) mmc_set_clock(mmc, mmc->tran_speed, false); /* execute tuning if needed */ + mmc->hs400_tuning = 1; err = mmc_execute_tuning(mmc, MMC_CMD_SEND_TUNING_BLOCK_HS200); + mmc->hs400_tuning = 0; if (err) { debug("tuning failed\n"); return err; diff --git a/include/mmc.h b/include/mmc.h index 93494d939a..bea1c49151 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -707,6 +707,7 @@ struct mmc { * accessing the boot partitions */ u32 quirks; + u8 hs400_tuning; }; struct mmc_hwpart_conf {