cfi-cmdset-0001: always update the chip status
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue May 16 20:59:01 EDT 2006
Commit: 6e7a6809c555aeb7cb98544df4d446fbd6f123ec
Parent: df54b52c411befdcf1d0989f939a49163570ad29
Author: Nicolas Pitre <nico at cam.org>
AuthorDate: Wed Mar 29 23:31:42 2006 +0100
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Wed May 17 01:22:23 2006 +0100
cfi-cmdset-0001: always update the chip status
... otherwise xip_enable() won't do the right thing.
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 | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index e797752..ab3888f 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -1479,8 +1479,10 @@ static int __xipram do_write_buffer(stru
[...], the device will not accept any more Write to Buffer commands".
So we must check here and reset those bits if they're set. Otherwise
we're just pissing in the wind */
- if (chip->state != FL_STATUS)
+ if (chip->state != FL_STATUS) {
map_write(map, CMD(0x70), cmd_adr);
+ chip->state = FL_STATUS;
+ }
status = map_read(map, cmd_adr);
if (map_word_bitsset(map, status, CMD(0x30))) {
xip_enable(map, chip, cmd_adr);
More information about the linux-mtd-cvs
mailing list