[v2, 05/11] mmc: add a hs400_tuning flag

Yangbo Lu yangbo.lu at nxp.com
Fri Jul 17 10:50:18 CEST 2020


Add a hs400_tuning flag to identify the tuning for HS400 mode.

Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
---
Changes for v2:
	- None.
---
 drivers/mmc/mmc.c | 2 ++
 include/mmc.h     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index a53f93a..a18e75d 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1976,7 +1976,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 161b8bc..2399cc2 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 {
-- 
2.7.4



More information about the U-Boot mailing list