[PATCH] cfi_cmdset_0001.c: Set flash explicitly to 'status read' mode
Olav Kongas
ok at artecdesign.ee
Mon Jan 9 02:17:08 EST 2006
Set flash explicitly to 'status read' mode. Without this patch, I have
experienced failures like an example below, if running executables from the
cramfs residing on Sharp's LHF64F12 flash chip.
Waiting for chip to be ready timed out. Status 3c31
end_request: I/O error, dev mtdblock0, sector 5400
Buffer I/O error on device mtdblock0, logical block 675
Error -3 while decompressing!
Signed-off-by: Olav Kongas <ok at artecdesign.ee>
--- linux-2.6.15-a/drivers/mtd/chips/cfi_cmdset_0001.c 2006-01-06 16:43:05.000000000 +0200
+++ linux-2.6.15-b/drivers/mtd/chips/cfi_cmdset_0001.c 2006-01-06 16:46:36.000000000 +0200
@@ -687,6 +687,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