Ross has done an excellent job answering questions. I'll just add a few more comments. On Tuesday 09 March 2010 23:45:24 Ross Younger wrote: > Saquib wrote: > > (1) *YAFFS2 Direct Interface* : What is the use of this interface? Is it > > mandatory when I use YAFFS2? > > YAFFS was originally developed as a filesystem module to be loaded into the > Linux kernel and accessed indirectly via the standard filesystem calls. It > has since been ported to other platforms including WinCE and eCos. The > Direct interface is for use in a system when you have no filesystem > interface, or do not want to use your platform's filesystem layer, which > would likely only be relevant in very specialised environments. As Ross says, the Yaffs Direct Interface wraps up the "core yaffs" so that the code can be used without any specialised OS glue layer. The Linux and eCOS ports do not use the Yaffs Direct Interface but instead the OS accesses yaffs via an OS-specific glue layer. In Linux this is yaffs_fs.c WinCE yaffs actually is a further wrapper layer around Yaffs Direct Interface. Most people using yaffs with other RTOSs use Yaffs Direct Interface. Yaffs Direct Interface is also used for building test harnesses where yaffs is built into an application for easier debugging. > > > (2) *Garbage Collection and Wear-Levelling*: How do I test these things > > are working? > > Set the yaffs_traceMask appropriately, run a stress test, collect the > diagnostic output and analyse it to determine whether these features are > operating correctly. The tracemask is a bitfield; its bits are named > YAFFS_TRACE_* and are defined in yportenv.h. > > See also http://www.yaffs.net/yaffs-debugging > > > (3) *4K Page Size* : This chip supports 4K page size. Is there any > > changes required in YAFFS2 source code for 4K support. > > I don't think so, provided the mtd (NAND chip) driver for your chip sets up > the yaffs_DeviceStruct appropriately. yaffs supports 4k pages with no changes. Indeed you could use 8k or 16k pages or even non power of 2 page sizes. One product uses 6k pages (3x2048-byte NAND chips in parallel) > > > (4) *Multiplane Programming* : The newer chip we are planning to use is > > multiplane NAND chip. How does YAFFS2 support Multiplane chip? > > YAFFS2 is known to support MLC parts. Others are better placed to comment > here, but I think it's largely transparent and would depend on having a > good mtd driver which uses the right ECC algorithm. You may need to look > carefully at the chip spec sheet to see whether a more complicated ECC > algorithm is required for the ECC YAFFS calculates internally on the tags > it stores in the spare area of each page. YAFFS does not provide specific multi-plane support but only accesses one page at a time. One way to handle this is to do a single-to-multi-page translation in your driver. That could buffer up page writes until there are enough to do a multi-plane write or something similar. -- Charles