[MTD] NOR: leave Intel chips in read-array mode on suspend

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Oct 21 11:59:05 EDT 2006


Commit:     a86aaa6ddf32b0401e64e74174042866e0fb3e20
Parent:     d29ebdbee4c196adddf9f412e6ea1f211656744f
commit a86aaa6ddf32b0401e64e74174042866e0fb3e20
Author:     David Anders <dave123_aml at yahoo.com>
AuthorDate: Thu Oct 19 19:33:19 2006 +0300
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sat Oct 21 16:43:53 2006 +0100

    [MTD] NOR: leave Intel chips in read-array mode on suspend
    
    During some testing with several samsung s3c24xx based
    devices it was discovered that often the
    cfi_cmdset_0001.c would not leave the chip in
    read-array mode on suspend. this is an issue if the
    same flash chip is used for the bootloader that needs
    to be read on resume.
    
    Signed-off-by: David Anders <danders at amltd.com>
    Signed-off-by: Nicolas Pitre <nico at cam.org>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/chips/cfi_cmdset_0001.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 7ea49a0..e249736 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -2224,6 +2224,8 @@ static int cfi_intelext_suspend(struct m
 		case FL_CFI_QUERY:
 		case FL_JEDEC_QUERY:
 			if (chip->oldstate == FL_READY) {
+				/* place the chip in a known state before suspend */
+				map_write(map, CMD(0xFF), cfi->chips[i].start);
 				chip->oldstate = chip->state;
 				chip->state = FL_PM_SUSPENDED;
 				/* No need to wake_up() on this state change -



More information about the linux-mtd-cvs mailing list