physmap and pointless shutdown() function ?
dwmw2 at infradead.org
Fri Jun 5 13:51:52 EDT 2009
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)
> 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.
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 at intel.com Intel Corporation
More information about the linux-mtd