From patchwork Fri Mar 12 13:26:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [MTD] physmap: remove physmap_flash_shutdown() method. Date: Fri, 12 Mar 2010 03:26:06 -0000 From: Vladimir Zapolskiy X-Patchwork-Id: 47674 Message-Id: <1268400366-14802-1-git-send-email-vzapolskiy@gmail.com> To: linux-mtd@lists.infradead.org Cc: Artem Bityutskiy , Lennert Buytenhek , Vladimir Zapolskiy , Mike Frysinger , David Woodhouse physmap driver operates with cfi, jedec, qinfo and map_rom compliant chips. None of interface drivers for all these chips uses actual suspend and resume chip operations, but correspondent two methods only change flash chip state in drivers' internal state machines, and for Intel chips save/restore block locks is done. To operate with boards with Intel flash chips where RP# pin is not asserted on reset there is an already implemented mechanism of reboot notifiers, and on reboot the flash moves into defined "read array" state. If CONFIG_PM kernel option is enabled, then physmap_flash_shutdown() method is called after reboot notifier work, and save/restore block locks operations disturb the chip from default "read array" state, thus if the flash is a bootable one, board cann't be booted from it after reset. Signed-off-by: Vladimir Zapolskiy Cc: David Woodhouse Cc: Artem Bityutskiy Cc: Mike Frysinger Cc: Lennert Buytenhek --- drivers/mtd/maps/physmap.c | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index d9603f7..dea81d7 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c @@ -193,25 +193,9 @@ err_out: return err; } -#ifdef CONFIG_PM -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]); -} -#else -#define physmap_flash_shutdown NULL -#endif - static struct platform_driver physmap_flash_driver = { .probe = physmap_flash_probe, .remove = physmap_flash_remove, - .shutdown = physmap_flash_shutdown, .driver = { .name = "physmap-flash", .owner = THIS_MODULE,