Re: [Yaffs] NAND flash controller computing ecc on main and …

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Babrian Viktor
Date:  
To: Charles Manning
CC: yaffs
Subject: Re: [Yaffs] NAND flash controller computing ecc on main and spare together
You are right. I was confused by the several write_oob functions in
nand_base.c. Thanks for the info!

Viktor Babrian

On Tue, 27 Oct 2009, Charles Manning wrote:

> Date: Tue, 27 Oct 2009 11:07:38 +1300
> From: Charles Manning <>
> To: 
> Cc: Babrian Viktor <>
> Subject: Re: [Yaffs] NAND flash controller computing ecc on main and spare
>     together

>
> On Saturday 24 October 2009 05:05:35 Babrian Viktor wrote:
>> e a uC with a nand flash controller that computes ECC on the
>> whole page at once. It has no separate bytes for spare area ECC. Which
>> means that oob data cannot be written separately. Yaffs is going to be
>> used on this chip and the question is that does yaffs write oob data
>> separately? I looked into the sources and I see write_oob() function calls
>
> yaffs1 writes tags seperately when it writes deletion markers.
> yaffs2 only ever writes tags together with data.
>
> The write_oob() call does not only write the oob area, it also writes the
> data. From yaffs_mtdif2.c:
>     ops.mode = MTD_OOB_AUTO;
>     ops.ooblen = (dev->inbandTags) ? 0 : packed_tags_size;
>     ops.len = dev->totalBytesPerChunk;
>     ops.ooboffs = 0;
>     ops.datbuf = (__u8 *)data;
>     ops.oobbuf = (dev->inbandTags) ? NULL : packed_tags_ptr;
>     retval = mtd->write_oob(mtd, addr, &ops);

>
> -- CHarles
>
>
>