[Yaffs] yaffs2 direct interface(tags)
Charles Manning
manningc2@actrix.gen.nz
Fri, 28 Jan 2005 10:35:55 +1300
On Thursday 27 January 2005 20:52, Abhishek Bhattacharya wrote:
> Hello
>=20
> Form the code of yaffs2, direct interface, it looks like there is no
> function like yaffs_LoadTagsIntoSpare().
> Instead in "yaffs_flashif.c", an attempt is made to write to the flash
> with tags.
>=20
> How does this spare concept get replaced by Extended tags?
In YAFFS, the yaffs_guts did the job of stuffing tags into a "spare" area=
.=20
This worked OK-ish for the fixed 512 byte page size, but has some problem=
s:
1) The "spare" atructure included ECC placement etc which made it messy=20
trying to work with mtd and alternative ECC schemes (like hardware ECC et=
c).
2) It did not really work well for larger page sizes.
3) It did not work well for alternative bad block marking methods.
So, for YAFFS2 I moved all the "spare awareness" out of yaffs-guts. Inste=
ad,=20
a more abstract ExtendedTags structure is passed throughthe NAND glue is=20
responsible for the job.
yaffs_packedtags1.c is used for packing extended tags into old Spare=20
strucutres.
yaffs_packedtags2.c is appropriate for use with 2K NAND devices.
>=20
> Is it necessary to use pack and unpack tags for yaffs2 , or can we
> directly pass a pointer to
> extended tags to the driver?
> Which pack, unpack routine should be used for yaffs2?
You can't store extended tags directly since some of the flags (eg. block=
Bad,=20
chunkUsed, eccResult) must be computed. See yaffs_packedtags2.c
=20
>=20
>=20
> I am using 128 MB NAND flash ( 2K + 64) bytes page