public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Lennert Buytenhek <buytenh@wantstofly.org>
Subject: Re: physmap and pointless shutdown() function ?
Date: Fri, 05 Jun 2009 18:51:52 +0100	[thread overview]
Message-ID: <1244224312.3751.187.camel@macbook.infradead.org> (raw)
In-Reply-To: <8bd0f97a0905061941s6055c6dfrf467a6b2b837c8f8@mail.gmail.com>

On Wed, 2009-05-06 at 22:41 -0400, Mike Frysinger wrote:
> waaaay back when power management support was added to the physmap.c
> driver, it added the standard suspend/resume functions.  no problem
> there.  but it also added a shutdown function which causes the flash
> to suspend/resume when rebooting:
> static void physmap_flash_shutdown(struct platform_device *dev)
> {
>     struct physmap_flash_info *info = platform_get_drvdata(dev);
>     int i;
>     for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++)
>         if (info->mtd[i]->suspend && info->mtd[i]->resume)
>             if (info->mtd[i]->suspend(info->mtd[i]) == 0)
>                 info->mtd[i]->resume(info->mtd[i]);
> }
> 
> i cant see any point in doing this.  it isnt like the flash has
> buffers that need flushing, and if they did, using suspend/resume as a
> hack for flushing sounds pretty broken to me.
> 
> seems to me the function should just be dropped completely.
> -mike

Wasn't that just to put it into read mode in case the bootloader is
running from the same chip? Reboot doesn't work very well if all you
have is flash status bits at your reset vector, because you didn't
bother to wire up a hardware reset line to the flash.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

  reply	other threads:[~2009-06-05 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07  2:41 physmap and pointless shutdown() function ? Mike Frysinger
2009-06-05 17:51 ` David Woodhouse [this message]
2009-06-05 23:42   ` Mike Frysinger
2009-06-06 12:27     ` David Woodhouse
2009-06-06 19:22       ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244224312.3751.187.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=buytenh@wantstofly.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vapier.adi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox