[PATCH 2/3] mmc: Add generic tuning flag
Paul Barker
paul.barker.ct at bp.renesas.com
Tue Feb 20 11:58:30 CET 2024
On 20/02/2024 08:37, Marek Vasut wrote:
> 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 at mailbox.org>
> ---
> Cc: Hai Pham <hai.pham.ud at renesas.com>
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Sean Anderson <seanga2 at gmail.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh at renesas.com>
> ---
> drivers/mmc/mmc-uclass.c | 8 +++++++-
> include/mmc.h | 1 +
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index 328456831dd..304bd5eaee2 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 92cffc6a19a..47ccf5f45a1 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -736,6 +736,7 @@ struct mmc {
> * accessing the boot partitions
> */
> u32 quirks;
> + bool tuning;
> bool hs400_tuning;
>
> enum bus_mode user_speed_mode; /* input speed mode from user */
Reviewed-by: Paul Barker <paul.barker.ct at bp.renesas.com>
Tested-by: Paul Barker <paul.barker.ct at bp.renesas.com>
(tested on RZ/G2L with commit ad50a8151387 from
https://source.denx.de/u-boot/custodians/u-boot-sh)
--
Paul Barker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x27F4B3459F002257.asc
Type: application/pgp-keys
Size: 3520 bytes
Desc: OpenPGP public key
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240220/c7dad89b/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240220/c7dad89b/attachment.sig>
More information about the U-Boot
mailing list