Message ID | 1351584769-16662-1-git-send-email-r66093@freescale.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 30 October 2012 09:12, <r66093@freescale.com> wrote: > From: Jerry Huang <Chang-Ming.Huang@freescale.com> > > When f_init is zero, the SDHC can't work correctly. So f_min will replace > f_init, when f_init is zero. > > Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> > CC: Anton Vorontsov <cbouatmailru@gmail.com> > CC: Chris Ball <cjb@laptop.org> > --- > changes for v2: > - add the CC > changes for v3: > - enalbe the controller clock in platform, instead of core > > drivers/mmc/core/core.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index 06c42cf..9c162cd 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -1319,7 +1319,10 @@ static void mmc_power_up(struct mmc_host *host) > */ > mmc_delay(10); > > - host->ios.clock = host->f_init; > + if (host->f_init) > + host->ios.clock = host->f_init; > + else > + host->ios.clock = host->f_min; This should not be needed. host->f_init should never become zero, I believe. > > host->ios.power_mode = MMC_POWER_ON; > mmc_set_ios(host); > -- > 1.7.9.5 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Kind regards Ulf Hansson -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Best Regards Jerry Huang > -----Original Message----- > From: Ulf Hansson [mailto:ulf.hansson@linaro.org] > Sent: Wednesday, October 31, 2012 7:09 AM > To: Huang Changming-R66093 > Cc: linux-mmc@vger.kernel.org; Huang Changming-R66093; Anton Vorontsov; > Chris Ball > Subject: Re: [PATCH 1/4 v3] MMC/core: Add f_min to mmc_power_on() > > On 30 October 2012 09:12, <r66093@freescale.com> wrote: > > From: Jerry Huang <Chang-Ming.Huang@freescale.com> > > > > When f_init is zero, the SDHC can't work correctly. So f_min will > replace > > f_init, when f_init is zero. > > > > Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> > > CC: Anton Vorontsov <cbouatmailru@gmail.com> > > CC: Chris Ball <cjb@laptop.org> > > --- > > changes for v2: > > - add the CC > > changes for v3: > > - enalbe the controller clock in platform, instead of core > > > > drivers/mmc/core/core.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > > index 06c42cf..9c162cd 100644 > > --- a/drivers/mmc/core/core.c > > +++ b/drivers/mmc/core/core.c > > @@ -1319,7 +1319,10 @@ static void mmc_power_up(struct mmc_host *host) > > */ > > mmc_delay(10); > > > > - host->ios.clock = host->f_init; > > + if (host->f_init) > > + host->ios.clock = host->f_init; > > + else > > + host->ios.clock = host->f_min; > > This should not be needed. host->f_init should never become zero, I > believe. > Uh, this patch can be removed. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/31/2012 08:08 AM, Ulf Hansson wrote: > On 30 October 2012 09:12, <r66093@freescale.com> wrote: >> From: Jerry Huang <Chang-Ming.Huang@freescale.com> >> >> When f_init is zero, the SDHC can't work correctly. So f_min will replace >> f_init, when f_init is zero. >> >> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> >> CC: Anton Vorontsov <cbouatmailru@gmail.com> >> CC: Chris Ball <cjb@laptop.org> >> --- >> changes for v2: >> - add the CC >> changes for v3: >> - enalbe the controller clock in platform, instead of core >> >> drivers/mmc/core/core.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c >> index 06c42cf..9c162cd 100644 >> --- a/drivers/mmc/core/core.c >> +++ b/drivers/mmc/core/core.c >> @@ -1319,7 +1319,10 @@ static void mmc_power_up(struct mmc_host *host) >> */ >> mmc_delay(10); >> >> - host->ios.clock = host->f_init; >> + if (host->f_init) >> + host->ios.clock = host->f_init; >> + else >> + host->ios.clock = host->f_min; > > This should not be needed. host->f_init should never become zero, I believe. I agree for Ulf's comment. > >> >> host->ios.power_mode = MMC_POWER_ON; >> mmc_set_ios(host); >> -- >> 1.7.9.5 >> >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > Kind regards > Ulf Hansson > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 06c42cf..9c162cd 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1319,7 +1319,10 @@ static void mmc_power_up(struct mmc_host *host) */ mmc_delay(10); - host->ios.clock = host->f_init; + if (host->f_init) + host->ios.clock = host->f_init; + else + host->ios.clock = host->f_min; host->ios.power_mode = MMC_POWER_ON; mmc_set_ios(host);