]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: add a hs400_tuning flag
authorYangbo Lu <yangbo.lu@nxp.com>
Tue, 1 Sep 2020 08:58:03 +0000 (16:58 +0800)
committerPeng Fan <peng.fan@nxp.com>
Mon, 12 Oct 2020 07:46:32 +0000 (15:46 +0800)
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 <yangbo.lu@nxp.com>
drivers/mmc/mmc.c
include/mmc.h

index 0727505304616b39041e2000d8d675bad10bdcc8..b75c2bc830ad3da5f590dfd9a1e4a4a4c07da860 100644 (file)
@@ -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;
index 93494d939a1cef70af0f5038b40f03271f08cb5a..bea1c491512f1e3bd744458920d42a6b42e28f45 100644 (file)
@@ -707,6 +707,7 @@ struct mmc {
                                  * accessing the boot partitions
                                  */
        u32 quirks;
+       u8 hs400_tuning;
 };
 
 struct mmc_hwpart_conf {