Message ID | 20240224223235.287889-2-marek.vasut+renesas@mailbox.org |
---|---|
State | Accepted |
Commit | 8c2208978877bf6533d97bde97ee763322d6308f |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | [v2,1/3] mmc: Convert hs400_tuning flag from u8 to bool | expand |
On 2/25/24 07:32, 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@mailbox.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > --- > Cc: Hai Pham <hai.pham.ud@renesas.com> > Cc: Jaehoon Chung <jh80.chung@samsung.com> > Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> > Cc: Paul Barker <paul.barker.ct@bp.renesas.com> > Cc: Peng Fan <peng.fan@nxp.com> > Cc: Sean Anderson <seanga2@gmail.com> > Cc: Tom Rini <trini@konsulko.com> > Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > --- > V2: Use bool var:1; > --- > 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 afca123b386..5c1be5c5b1e 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 */
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 afca123b386..5c1be5c5b1e 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 */
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> --- Cc: Hai Pham <hai.pham.ud@renesas.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Paul Barker <paul.barker.ct@bp.renesas.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Sean Anderson <seanga2@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- V2: Use bool var:1; --- drivers/mmc/mmc-uclass.c | 8 +++++++- include/mmc.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)