]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: Add generic tuning flag
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 24 Feb 2024 22:32:10 +0000 (23:32 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 15 Apr 2024 06:19:12 +0000 (15:19 +0900)
Set generic mmc->tuning flag when performing tuning to indicate
this condition to drivers. Drivers may use this to bypass various
checks during tuning.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc-uclass.c
include/mmc.h

index 328456831dd28f24473f8530b8406f1bef269a5b..304bd5eaee23f12b4a1d5dc32bd2f751020b09f8 100644 (file)
@@ -124,7 +124,13 @@ static int dm_mmc_execute_tuning(struct udevice *dev, uint opcode)
 
 int mmc_execute_tuning(struct mmc *mmc, uint opcode)
 {
-       return dm_mmc_execute_tuning(mmc->dev, opcode);
+       int ret;
+
+       mmc->tuning = true;
+       ret = dm_mmc_execute_tuning(mmc->dev, opcode);
+       mmc->tuning = false;
+
+       return ret;
 }
 #endif
 
index a4584f847296f58c1778a3bd632300d6765ca099..4b8327f1f93b6bebdaa1c8e968b46df311afde73 100644 (file)
@@ -736,6 +736,7 @@ struct mmc {
                                  * accessing the boot partitions
                                  */
        u32 quirks;
+       bool tuning:1;
        bool hs400_tuning:1;
 
        enum bus_mode user_speed_mode; /* input speed mode from user */