mtd/drivers/mtd/chips cfi_cmdset_0002.c,1.112,1.113
dvrabel at infradead.org
dvrabel at infradead.org
Fri Dec 3 05:26:44 EST 2004
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv30629
Modified Files:
cfi_cmdset_0002.c
Log Message:
Use chip_ready() in do_write_oneword().
Index: cfi_cmdset_0002.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0002.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- cfi_cmdset_0002.c 20 Nov 2004 12:49:04 -0000 1.112
+++ cfi_cmdset_0002.c 3 Dec 2004 10:26:41 -0000 1.113
@@ -764,23 +764,11 @@
continue;
}
- /* Test to see if toggling has stopped. */
- oldd = map_read(map, adr);
- curd = map_read(map, adr);
- if (map_word_equal(map, curd, oldd)) {
- /* Do we have the correct value? */
- if (map_word_equal(map, curd, datum)) {
- goto op_done;
- }
- /* Nope something has gone wrong. */
- break;
- }
+ if (chip_ready(map, adr))
+ goto op_done;
- if (time_after(jiffies, timeo)) {
- printk(KERN_WARNING "MTD %s(): software timeout\n",
- __func__ );
- break;
- }
+ if (time_after(jiffies, timeo))
+ break;
/* Latency issues. Drop the lock, wait a while and retry */
cfi_spin_unlock(chip->mutex);
@@ -788,6 +776,8 @@
cfi_spin_lock(chip->mutex);
}
+ printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
+
/* reset on all failures. */
map_write( map, CMD(0xF0), chip->start );
/* FIXME - should have reset delay before continuing */
More information about the linux-mtd-cvs
mailing list