>> So, are there any assumptions about block size for 2K page ? or 256K
>> block size will work as is..
>>
>
> The define YAFFS_CHUNKS_PER_BLOCK (from yaffs_guts.h) might be what
> you're looking for. That, or dev->nChunksPerBlock if you're using
> Yaffs-Direct.
>
> If you've got no way of knowing whether it's a 128K block size or a 256K
> block size, then you might be best off telling Yaffs to use a 256K block
> size, and tweaking your NAND driver to send two erase commands (so 128K
> NAND will behave like 256K NAND).
It seems for yaffs2, these parameters are not set using #defines but
from mtd. Please see below snippet.
yaffs_fs.c:
if (yaffsVersion == 2) {
....
....
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
dev->nDataBytesPerChunk = mtd->writesize;
dev->nChunksPerBlock = mtd->erasesize / mtd->writesize;
#else
dev->nDataBytesPerChunk = mtd->oobblock;
dev->nChunksPerBlock = mtd->erasesize / mtd->oobblock;
#endif
nBlocks = mtd->size / mtd->erasesize;
dev->startBlock = 0;
dev->endBlock = nBlocks - 1;
So are above the only parameters ? or some other place also I need to verify.
>
> James
Thanks
Amol