Message ID | 20230610112233.46728-1-marek.vasut+renesas@mailbox.org |
---|---|
State | Accepted |
Commit | 50dee4f3610331cc31f1f02f9d4116b716907011 |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | mmc: Set clock when reverting to safe bus mode | expand |
On 6/10/2023 7:22 PM, Marek Vasut wrote: > From: Valentine Barshak <valentine.barshak@cogentembedded.com> > > Set MMC clock when reverting to safe bus mode and speed > in case current MMC mode fails. Otherwise, trying out > the other modes may fail as well. > > Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> > Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> > [hp: fallback to legacy_speed] > Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> > --- > Cc: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org> > Cc: Hai Pham <hai.pham.ud@renesas.com> > Cc: Jaehoon Chung <jh80.chung@samsung.com> > Cc: Loic Poulain <loic.poulain@linaro.org> > Cc: Peng Fan <peng.fan@nxp.com> > Cc: Simon Glass <sjg@chromium.org> > Cc: Takeshi Kihara <takeshi.kihara.df@renesas.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> > --- > drivers/mmc/mmc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 68a76aa3e94..79d0d37c240 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -2231,6 +2231,7 @@ error: > mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, > EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_1); > mmc_select_mode(mmc, MMC_LEGACY); > + mmc_set_clock(mmc, mmc->legacy_speed, MMC_CLK_ENABLE); > mmc_set_bus_width(mmc, 1); > } > }
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 68a76aa3e94..79d0d37c240 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2231,6 +2231,7 @@ error: mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_1); mmc_select_mode(mmc, MMC_LEGACY); + mmc_set_clock(mmc, mmc->legacy_speed, MMC_CLK_ENABLE); mmc_set_bus_width(mmc, 1); } }