patch to leave cfi in read-array on suspend

David Anders dave123_aml at
Fri Sep 22 11:07:44 EDT 2006


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 read on resume. attached is a patch generated
against the 2.6.18 kernel and has been tested with
several s3c24xx based devices as well as several sharp
lh79520 devices. your feedback would be appreciated.

Signed-off-by: David Anders <danders at>

--- linux-2.6.18/drivers/mtd/chips/cfi_cmdset_0001.c    2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-m5900/drivers/mtd/chips/cfi_cmdset_0001.c      2006-09-22 09:16:21.000000000
@@ -2224,6 +2224,8 @@
                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 -

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the linux-mtd mailing list