Re: [Yaffs] Yaffs and MTD

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nick Bane
Date:  
To: Ian McDonnell
CC: yaffs
Subject: Re: [Yaffs] Yaffs and MTD
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;    


Better to use a specific CONFIG option probably.

NB to all 2.4.x backporters: I note that the new yaffs_mtdif2.c computes
an address to pass to mtd->block_isbad and mtd->block_markbad rather
than a block index. This breaks by old 2.4.25 port. Use an if
(LINUX_VERSION_CODE ...) round the relevant places and use
mtd->block_xxxbad(mtd,blockNo) instead.

Nick