* chip_ready patch for SST39VF640xB
@ 2007-02-02 16:03 Niels Gram Jeppesen
2007-02-04 9:51 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Niels Gram Jeppesen @ 2007-02-02 16:03 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 477 bytes --]
Hi,
In cfi_cmdset_0002.c, chip_ready seems to be unreliable on the SST39VF640xB chip. The attached patch add two extra reads to chip_ready in accordance with the chip data sheet (page 3, "Write Operation Status Detection"). This seems to make the write cycle completion detection reliable. I have not tested the patch on any other chips but I would think that it would be harmless on chips that do not need the extra reads.
Best regards; hope this helps,
Niels
[-- Attachment #2: cfi_cmdset_0002.c.patch --]
[-- Type: application/octet-stream, Size: 529 bytes --]
--- download/linux-2.6.19/drivers/mtd/chips/cfi_cmdset_0002.c 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19-ks8695/drivers/mtd/chips/cfi_cmdset_0002.c 2007-02-02 16:26:55.000000000 +0100
@@ -452,6 +452,14 @@
d = map_read(map, addr);
t = map_read(map, addr);
+ /* Do two extra reads to ensure that status detection works
+ * on the SST39VF640xB
+ */
+ if (map_word_equal(map, d, t))
+ t = map_read(map, addr);
+ if (map_word_equal(map, d, t))
+ t = map_read(map, addr);
+
return map_word_equal(map, d, t);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: chip_ready patch for SST39VF640xB
2007-02-02 16:03 chip_ready patch for SST39VF640xB Niels Gram Jeppesen
@ 2007-02-04 9:51 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2007-02-04 9:51 UTC (permalink / raw)
To: Niels Gram Jeppesen; +Cc: linux-mtd
Hi,
On Fri, 2007-02-02 at 17:03 +0100, Niels Gram Jeppesen wrote:
> In cfi_cmdset_0002.c, chip_ready seems to be unreliable on the SST39VF640xB chip. The attached patch add two extra reads to chip_ready in accordance with the chip data sheet (page 3, "Write Operation Status Detection"). This seems to make the write cycle completion detection reliable. I have not tested the patch on any other chips but I would think that it would be harmless on chips that do not need the extra reads.
1. The patch is not applicable to mtd-2.6.git.
2. Please, add Siged-off-by line.
Look here please: http://www.linux-mtd.infradead.org/source.html
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-04 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-02 16:03 chip_ready patch for SST39VF640xB Niels Gram Jeppesen
2007-02-04 9:51 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox