public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* patch to leave cfi in read-array on suspend(reposted)
@ 2006-10-19 14:05 David Anders
  2006-10-19 14:21 ` Nicolas Pitre
  0 siblings, 1 reply; 3+ messages in thread
From: David Anders @ 2006-10-19 14:05 UTC (permalink / raw)
  To: linux-mtd; +Cc: nico

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

greetings,

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. 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@amltd.com>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[-- Attachment #2: 3238585821-cfi_cmdset_0001.patch --]
[-- Type: application/octet-stream, Size: 524 bytes --]

--- 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 -0400
@@ -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 -

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patch to leave cfi in read-array on suspend(reposted)
  2006-10-19 14:05 patch to leave cfi in read-array on suspend(reposted) David Anders
@ 2006-10-19 14:21 ` Nicolas Pitre
  2006-10-19 14:26   ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Pitre @ 2006-10-19 14:21 UTC (permalink / raw)
  To: David Anders; +Cc: linux-mtd

On Thu, 19 Oct 2006, David Anders wrote:

> greetings,
> 
> 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. 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@amltd.com>

Signed-off-by: Nicolas Pitre <nico@cam.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patch to leave cfi in read-array on suspend(reposted)
  2006-10-19 14:21 ` Nicolas Pitre
@ 2006-10-19 14:26   ` Artem Bityutskiy
  0 siblings, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2006-10-19 14:26 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: David Anders, linux-mtd

On Thu, 2006-10-19 at 10:21 -0400, Nicolas Pitre wrote:
> > 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. 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@amltd.com>
> 
> Signed-off-by: Nicolas Pitre <nico@cam.org>

Thanks,

will add it to my git tree and take care about its destiny.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-19 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-19 14:05 patch to leave cfi in read-array on suspend(reposted) David Anders
2006-10-19 14:21 ` Nicolas Pitre
2006-10-19 14:26   ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox