David Goodenough wrote: > On Monday 14 May 2007, Claudio Lanconelli wrote: > >> Hi David, >> >> I suggest you to try this with the latest Yaffs + recent kernel (2.6.19 >> or newer): >> >> Use MTD_OOB_AUTO with the following layout (as suggested by Ian): >> > Where do I put the MTD_OOB_AUTO? > It's the default, you can find it in mtdif.c nandmtd_WriteChunkToNAND() and nandmtd_ReadChunkFromNAND(). >> static struct nand_ecclayout nand_oob_16 = { >> .eccbytes = 6, >> .eccpos = { 9, 8, 10, 14, 13, 15 }, >> .oobfree = { { 0, 4 }, { 6, 2 }, { 11, 2 } } >> }; >> >> with CONFIG_NAND_ECC_SMC = N >> > Ian suggested using .oobfree 0,5 not 0,4 for the newer MTD API, > and I am using the newer MTD API as far as I know. > > This is the form I am using with ...ECC_SMC = N. > > But he also suggested:- > >>> AND fix up the yaffs pack/unpack funcs and calls to MTD >>> read/write to understand this. The block status can be gotten >>> the same way, but this should only be needed by the scan step >>> and can be retrieved from the (new) mtd using the bad-block test >>> call. >>> > and I do not know how to do this or whether you are saying that > this should not be necessary. > You can try the simple way first, with oobfree 0,4 and no change in mtdif.c. If it doesn't work you can try oob 0,5 but you should fix mtdif.c. Try this patch