aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0001.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-03-29 17:31:42 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-16 20:22:23 -0400
commit6e7a6809c555aeb7cb98544df4d446fbd6f123ec (patch)
tree15b9d84d7350396fc08541f54ec42842fd2187ef /drivers/mtd/chips/cfi_cmdset_0001.c
parentdf54b52c411befdcf1d0989f939a49163570ad29 (diff)
cfi-cmdset-0001: always update the chip status
... otherwise xip_enable() won't do the right thing. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c4
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 e797752f7c0b..ab3888f5e464 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(struct map_info *map, struct flchip *chip,
1479 [...], the device will not accept any more Write to Buffer commands". 1479 [...], the device will not accept any more Write to Buffer commands".
1480 So we must check here and reset those bits if they're set. Otherwise 1480 So we must check here and reset those bits if they're set. Otherwise
1481 we're just pissing in the wind */ 1481 we're just pissing in the wind */
1482 if (chip->state != FL_STATUS) 1482 if (chip->state != FL_STATUS) {
1483 map_write(map, CMD(0x70), cmd_adr); 1483 map_write(map, CMD(0x70), cmd_adr);
1484 chip->state = FL_STATUS;
1485 }
1484 status = map_read(map, cmd_adr); 1486 status = map_read(map, cmd_adr);
1485 if (map_word_bitsset(map, status, CMD(0x30))) { 1487 if (map_word_bitsset(map, status, CMD(0x30))) {
1486 xip_enable(map, chip, cmd_adr); 1488 xip_enable(map, chip, cmd_adr);