Message ID | 20180123050430.8775-1-jh80.chung@samsung.com |
---|---|
State | Accepted |
Commit | c0fafe64a5a8fbbd48c4d3bed730f45dfa6d85b5 |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | [U-Boot] mmc: fix to assign to corret clock value when clock is enabling | expand |
Le 23/01/2018 à 06:04, Jaehoon Chung a écrit : > When clock is enabling, it's assigned to 0 as mmc->clock. > Then it can't initialize any card. > Fix to assign to correct clock value as mmc->cfg->f_min or f_max. > > Fixes: 9546eb92cb6 ("mmc: fix the wrong disabling clock") I tested your patch on top of u-boot-mmc and SD/MMC is working fine on snow config (Samsung Chromebook). Tested-by: Guillaume GARDET <guillaume.gardet@free.fr> > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 311f51f237..2d0e7bb3a2 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -1501,7 +1501,7 @@ static int mmc_set_ios(struct mmc *mmc) > > int mmc_set_clock(struct mmc *mmc, uint clock, bool disable) > { > - if (!disable && clock != 0) { > + if (!disable) { > if (clock > mmc->cfg->f_max) > clock = mmc->cfg->f_max; >
Hi Jaehoon On 23 January 2018 at 10:34, Jaehoon Chung <jh80.chung@samsung.com> wrote: > When clock is enabling, it's assigned to 0 as mmc->clock. > Then it can't initialize any card. > Fix to assign to correct clock value as mmc->cfg->f_min or f_max. > > Fixes: 9546eb92cb6 ("mmc: fix the wrong disabling clock") > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 311f51f237..2d0e7bb3a2 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -1501,7 +1501,7 @@ static int mmc_set_ios(struct mmc *mmc) > > int mmc_set_clock(struct mmc *mmc, uint clock, bool disable) > { > - if (!disable && clock != 0) { > + if (!disable) { > if (clock > mmc->cfg->f_max) > clock = mmc->cfg->f_max; > > -- > 2.15.1 > Please add my, Tested on Odroid XU4 Tested-by: Anand Moon <linux.amoon@gmail.com> Best Regards -Anand
On 01/22/2018 10:04 PM, Jaehoon Chung wrote: > When clock is enabling, it's assigned to 0 as mmc->clock. > Then it can't initialize any card. > Fix to assign to correct clock value as mmc->cfg->f_min or f_max. Tested-by: Stephen Warren <swarren@nvidia.com> Thanks! > Fixes: 9546eb92cb6 ("mmc: fix the wrong disabling clock") > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Nit: There's usually not a blank line between the Fixes: and Signed-off-by: lines. Nit: s/corret/correct/ in the patch subject.
On 01/24/2018 04:01 AM, Stephen Warren wrote: > On 01/22/2018 10:04 PM, Jaehoon Chung wrote: >> When clock is enabling, it's assigned to 0 as mmc->clock. >> Then it can't initialize any card. >> Fix to assign to correct clock value as mmc->cfg->f_min or f_max. > > Tested-by: Stephen Warren <swarren@nvidia.com> > Thanks! > >> Fixes: 9546eb92cb6 ("mmc: fix the wrong disabling clock") >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > > Nit: There's usually not a blank line between the Fixes: and Signed-off-by: lines. > > Nit: s/corret/correct/ in the patch subject. After fixing typo and changing with your commen, Applied to u-boot-mmc. Best Regards, Jaehoon Chung > > >
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 311f51f237..2d0e7bb3a2 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1501,7 +1501,7 @@ static int mmc_set_ios(struct mmc *mmc) int mmc_set_clock(struct mmc *mmc, uint clock, bool disable) { - if (!disable && clock != 0) { + if (!disable) { if (clock > mmc->cfg->f_max) clock = mmc->cfg->f_max;
When clock is enabling, it's assigned to 0 as mmc->clock. Then it can't initialize any card. Fix to assign to correct clock value as mmc->cfg->f_min or f_max. Fixes: 9546eb92cb6 ("mmc: fix the wrong disabling clock") Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)