lkml.org 
[lkml]   [2009]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mmc: In mmc_power_up, use previously selected ocr if available
On Tue, Feb 17, 2009 at 01:29:00PM -0800, Andrew Morton wrote:
> On Mon, 9 Feb 2009 18:58:08 +0530
> Balaji Rao <balajirrao@openmoko.org> wrote:
>
> > When mmc_power_up is called during unsafe resume, host->ocr should be
> > used instead of host->ocr_avail.
> >
> > Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
> > Cc: Andy Green <andy@openmoko.com>
> > Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
> > ---
> > drivers/mmc/core/core.c | 8 +++++++-
> > 1 files changed, 7 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> > index df6ce4a..3ad7f87 100644
> > --- a/drivers/mmc/core/core.c
> > +++ b/drivers/mmc/core/core.c
> > @@ -572,7 +572,13 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing)
> > */
> > static void mmc_power_up(struct mmc_host *host)
> > {
> > - int bit = fls(host->ocr_avail) - 1;
> > + int bit;
> > +
> > + /* If ocr is set, we use it */
> > + if (host->ocr)
> > + bit = ffs(host->ocr) - 1;
> > + else
> > + bit = fls(host->ocr_avail) - 1;
> >
> > host->ios.vdd = bit;
> > if (mmc_host_is_spi(host)) {
>
> What are the user-visible consequences of not having this patch in
> their kernels?
>
> In other words, what does this patch fix?
>
> Please always include this information in changelogs.
>
OK, sorry about that.

Actually, it's nothing more than the wrong voltage being used on resume.
I have seen no consequences of this, but it shouldn't be doing so and
should be using the voltage determined at probing time.

> See, this patch is applicable to 2.6.28, 2.6.27, 2.6.26, 2.6.25 and
> probably earlier. But I don't have a clue whether it should be applied
> to those kernels, because you didn't tell me.

But since I haven't really seen any trouble, we could well apply it only
to the current kernel ?

Thanks,
Balaji


\
 
 \ /
  Last update: 2009-02-18 12:23    [from the cache]
©2003-2011 Jasper Spaans