JFFS2 peoblems with K3 strata flash on Dalhart

Yuan, Cain cain.yuan at intel.com
Wed Aug 7 11:18:53 EDT 2002


Dear David,
Please notice the fact:  
   at the first,  I burn JFFS2  into K3  flash, then load zImage It boot up
all ok, and   JFFS2 file system are all OK.
But after reset   and load zImage again  I can't create/del  files on JFFS2
file system.
SO I think   there is no much concern with the cfi_xxx_write function, maybe
the status is not  correctly set.
As to buffer writes, I  see  some  lines in  cfi_cmdset_001.c:

// debugging, turns off buffer write mode  #define      FORCE_WORD_WRITE
. . . . . . 
    mtd->read = cfi_intelext_read;
#ifndef FORCE_WORD_WRITE
    if ( cfi->cfiq->BufWriteTimeoutTyp ) {
        printk("Using buffer write method\n" );
        mtd->write = cfi_intelext_write_buffers;
    } else {
#else
    {
#endif
        printk("Using word write method\n" );
        mtd->write = cfi_intelext_write_words;
    }
 . . . . 

So I added #define      FORCE_WORD_WRITE     at hte begining of the file, so
I think   there is nothing concerned with   buffer write functions.
 



cain.yuan at intel.com said:
>  ---  Since using CFI  with Ks flash, I think  it is CFI driver and
> cfi_cmdset_001.c,  the  code   reside in  linux2.4.18-rmk6-pxa2.
>       Should I download  newest   code from CVS server and merge them
> into the   kernel src tree? 

Er, I don't think there have been significant changes since then. Updating 
to the latest code certainly can't hurt though.

The problem is that the chip write() call is returning zero (i.e. no error) 
but is setting the number of written bytes to zero. That doesn't make sense 
-- if it didn't write all the bytes we asked it to, then there must have 
been an error.

This chip supports buffer writes, doesn't it? Can you add some extra 
'printk' calls in cfi_intelext_write_buffers() to try to show what's 
happening to 'retlen' and when it returns.




More information about the linux-mtd mailing list