mtd: cfi_cmdset_0001.c: fix resume for LH28F640BF chips
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sun Nov 2 13:59:02 PST 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=89cf38dd536a7301d6b5f5ddd73f42074c01bfaa
Commit: 89cf38dd536a7301d6b5f5ddd73f42074c01bfaa
Parent: 0c53b4e7e25a2635aef3006b990b6802cefc873f
Author: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
AuthorDate: Thu Oct 23 01:23:01 2014 +0200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Oct 29 18:50:52 2014 -0700
mtd: cfi_cmdset_0001.c: fix resume for LH28F640BF chips
After '#echo mem > /sys/power/state' some devices can not be properly resumed
because apparently the MTD Partition Configuration Register has been reset
to default thus the rootfs cannot be mounted cleanly on resume.
An example of this can be found in the SA-1100 Developer's Manual at 9.5.3.3
where the second step of the Sleep Shutdown Sequence is described:
"An internal reset is applied to the SA-1100. All units are reset...".
As workaround we refresh the PCR value as done initially on chip setup.
This behavior and the fix are confirmed by our tests done on 2 different Zaurus
collie units with kernel 3.17.
Fixes: 812c5fa82bae: ("mtd: cfi_cmdset_0001.c: add support for Sharp LH28F640BF NOR")
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Signed-off-by: Andrea Adami <andrea.adami at gmail.com>
Cc: <stable at vger.kernel.org> # 3.16+
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index a7543ba..3096f3d 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -2590,6 +2590,8 @@ static void cfi_intelext_resume(struct mtd_info *mtd)
/* Go to known state. Chip may have been power cycled */
if (chip->state == FL_PM_SUSPENDED) {
+ /* Refresh LH28F640BF Partition Config. Register */
+ fixup_LH28F640BF(mtd);
map_write(map, CMD(0xFF), cfi->chips[i].start);
chip->oldstate = chip->state = FL_READY;
wake_up(&chip->wq);
More information about the linux-mtd-cvs
mailing list