[Yaffs] Yaffs and MTD

Charles Manning manningc2 at actrix.gen.nz
Tue Dec 13 20:27:26 GMT 2005


On Wednesday 14 December 2005 06:35, Nick Bane wrote:
> My kernel can cope with both 512 and 2k page NAND. It uses nand_ecc for
> 2k and yaffs_ecc for 512 for legacy reasons.
>
> >>               if (yaffsVersion == 1 && mtd->oobblock == 2048) {
> >>                       printk(KERN_INFO "yaffs: auto selecting
> >> yaffs2\n"); yaffsVersion = 2;
> >>               }
>
> So I add after #ifndef CONFIG_YAFFS_DOES_ECC .. #endif
>
> 		/* NCB force NANDECC if yaffs2 */
> 		if (yaffsVersion == 2)
> 			dev->useNANDECC = 1;
>

From memory, and a quick look at the code, useNANDECC has no bearing on yaffs2 
since yaffs2 always pushes all the ECC into mtd.

useNANDECC is used in an if(), but the code paths are the same. Should be 
cleaned up I guess.


-- Charles



More information about the yaffs mailing list