From: Marek Vasut Date: Sat, 24 Feb 2024 22:32:10 +0000 (+0100) Subject: mmc: Add generic tuning flag X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=8c2208978877bf6533d97bde97ee763322d6308f;p=u-boot.git mmc: Add generic tuning flag 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 Reviewed-by: Jaehoon Chung --- diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 328456831d..304bd5eaee 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -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 diff --git a/include/mmc.h b/include/mmc.h index a4584f8472..4b8327f1f9 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -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 */