linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [MTD] physmap: remove physmap_flash_shutdown() method.
@ 2010-03-12 13:26 Vladimir Zapolskiy
  2010-03-12 13:27 ` Mike Frysinger
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vladimir Zapolskiy @ 2010-03-12 13:26 UTC (permalink / raw)
  To: linux-mtd
  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 <vzapolskiy@gmail.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
---
 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,
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-13 23:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-12 13:26 [PATCH] [MTD] physmap: remove physmap_flash_shutdown() method Vladimir Zapolskiy
2010-03-12 13:27 ` Mike Frysinger
2010-03-25  8:03 ` Vladimir Zapolskiy
2010-04-06  8:58 ` Artem Bityutskiy
2010-04-06 10:11   ` Vladimir Zapolskiy
2010-04-06 10:25     ` Artem Bityutskiy
2010-05-13 23:36 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).