Skip to content

Commit 89cf38d

Browse files
lumagcomputersforpeace
authored andcommitted
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: 812c5fa: ("mtd: cfi_cmdset_0001.c: add support for Sharp LH28F640BF NOR") Signed-off-by: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: Andrea Adami <[email protected]> Cc: <[email protected]> # 3.16+ Signed-off-by: Brian Norris <[email protected]>
1 parent 0c53b4e commit 89cf38d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/mtd/chips/cfi_cmdset_0001.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,6 +2590,8 @@ static void cfi_intelext_resume(struct mtd_info *mtd)
25902590

25912591
/* Go to known state. Chip may have been power cycled */
25922592
if (chip->state == FL_PM_SUSPENDED) {
2593+
/* Refresh LH28F640BF Partition Config. Register */
2594+
fixup_LH28F640BF(mtd);
25932595
map_write(map, CMD(0xFF), cfi->chips[i].start);
25942596
chip->oldstate = chip->state = FL_READY;
25952597
wake_up(&chip->wq);

0 commit comments

Comments
 (0)