[PATCH] [MTD] physmap: remove physmap_flash_shutdown() method.

Vladimir Zapolskiy vzapolskiy at gmail.com
Fri Mar 12 08:26:06 EST 2010


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 at gmail.com>
Cc: David Woodhouse <David.Woodhouse at intel.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Cc: Mike Frysinger <vapier.adi at gmail.com>
Cc: Lennert Buytenhek <buytenh at 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




More information about the linux-mtd mailing list