Solved - Buffer I/O error - chip access timings in 2.6.13?

Olav Kongas ok at
Mon Oct 24 17:26:35 EDT 2005

It turned out that the flash chip was in the 'read' mode, 
while it was expected to be in the 'read status' mode. Hence 
the errors described in the parent e-mail. The following 
patch cures the problem for me. I hope the patch is suitable 
for submission to mainline. 


--- linux-2.6.14-rc4-or/drivers/mtd/chips/cfi_cmdset_0001.c	2005-10-11 04:19:19.000000000 +0300
+++ linux-2.6.14-rc4-flash/drivers/mtd/chips/cfi_cmdset_0001.c	2005-10-24 23:52:12.000000000 +0300
@@ -643,6 +643,9 @@ static int get_chip(struct map_info *map
 	switch (chip->state) {
 	case FL_STATUS:
+		/* Some chips (e.g. Sharp's LHF64F12) need to be
+		   explicitly set to 'status read' mode. */
+		map_write(map, CMD(0x70), adr);
 		for (;;) {
 			status = map_read(map, adr);
 			if (map_word_andequal(map, status, status_OK, status_OK))

More information about the linux-mtd mailing list