[Yaffs] Re: YAFFS and HW ECC
Thomas Gleixner
tglx@linutronix.de
Fri, 18 Mar 2005 02:03:18 +0100
On Thu, 2005-03-17 at 18:32 -0600, Roberts Nathan-mcg31137 wrote:
> It seems like mkyaffsimage generates an image
> that contains the OOB info based on how it wants the tags placed:
>
> typedef struct
> {
> __u8 tagByte0;
> __u8 tagByte1;
> __u8 tagByte2;
> __u8 tagByte3;
> __u8 pageStatus; // set to 0 to delete the chunk
> __u8 blockStatus;
> __u8 tagByte4;
> __u8 tagByte5;
> __u8 ecc1[3];
> __u8 tagByte6;
> __u8 tagByte7;
> __u8 ecc2[3];
> } yaffs_Spare;
>
>
> Both nandwrite and mkyaffs will then use the MEMWRITEOOB ioctl to write
> these 16 bytes to the OOB. MEMWRITEOOB doesn't appear to use the oobfree
> info to figure out how to write the OOB info so it looks to me like it
> will write these 16 bytes as layed out above (which will not work with
> the hardware ecc placement scheme I am using).
>
> Is this just a case where the tools should really be using GETOOBSEL to figure
> out where the free bytes are and then program accordingly?
Yes, you're right. nandwrite should provide an option to merge the bytes
into the oob buffer. We cannot use the same mechanism we use in the fs,
because the userspace interface does not provide it.
tglx