RE: [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Hein_Tibosch [mailto:hein_tibosch@xxxxxxxx]
> Sent: Tuesday, December 06, 2011 8:13 PM
> To: Huang Changming-R66093
> Cc: linux-mmc@xxxxxxxxxxxxxxx; Huang Changming-R66093; Chris Ball
> Subject: Re: [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on()
> 
> Hi Jerry,
> 
> On 12/6/2011 5:18 PM, r66093@xxxxxxxxxxxxx wrote:
> > From: Jerry Huang <Chang-Ming.Huang@xxxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxxx>
> > CC: Chris Ball <cjb@xxxxxxxxxx>
> > ---
> > changes for v2:
> > 	- add the CC
> >
> >  drivers/mmc/core/core.c |    5 ++++-
> >  1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index
> > a08e6b1..2d40c04 100644
> > --- a/drivers/mmc/core/core.c
> > +++ b/drivers/mmc/core/core.c
> > @@ -1253,7 +1253,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;
> 
> Are you sure f_min can have a value of zero?
> It should have been set mmc_rescan_try_freq(), when trying a list of
> frequencies: 400000, 300000, 200000, 100000
> 
But, mmc_power_up is called not only by mmc_rescan_try_freq, so the value of f_init may be zero.

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux