- // Entry parameters set up way early. Yaffs sets up the rest.
- int nBytesPerChunk; // Should be a power of 2 >= 512
- int nChunksPerBlock; // does not need to be a power of 2
- int nBytesPerSpare; // spare area size
- int startBlock; // Start block we're allowed to use
- int endBlock; // End block we're allowed to use
- int nReservedBlocks; // We want this tuneable so that we can reduce
- // reserved blocks on NOR and RAM.
-
- int nShortOpCaches; // If <= 0, then short op caching is disabled, else
- // the number of short op caches (don't use too many).
-
- int useHeaderFileSize; // Flag to determine if we should use file sizes from the header
+ /*
+ * Entry parameters set up way early. Yaffs sets up the rest.
+ * The structure should be zeroed out before use so that unused
+ * and defualt values are zero.
+ */
+
+ int inbandTags; /* Use unband tags */
+ __u32 totalBytesPerChunk; /* Should be >= 512, does not need to be a power of 2 */
+ int nChunksPerBlock; /* does not need to be a power of 2 */
+ int spareBytesPerChunk; /* spare area size */
+ int startBlock; /* Start block we're allowed to use */
+ int endBlock; /* End block we're allowed to use */
+ int nReservedBlocks; /* We want this tuneable so that we can reduce */
+ /* reserved blocks on NOR and RAM. */
+
+
+ int nShortOpCaches; /* If <= 0, then short op caching is disabled, else
+ * the number of short op caches (don't use too many).
+ * 10 to 20 is a good bet.
+ */
+ int useNANDECC; /* Flag to decide whether or not to use NANDECC on data (yaffs1) */
+ int noTagsECC; /* Flag to decide whether or not to do ECC on packed tags (yaffs2) */
+
+ int isYaffs2; /* Use yaffs2 mode on this device */
+
+ int emptyLostAndFound; /* Auto-empty lost+found directory on mount */
+
+ /* Checkpoint control. Can be set before or after initialisation */
+ __u8 skipCheckpointRead;
+ __u8 skipCheckpointWrite;
+
+ /* NAND access functions (Must be set before calling YAFFS)*/
+
+ int (*writeChunkToNAND) (struct yaffs_DeviceStruct *dev,
+ int chunkInNAND, const __u8 *data,
+ const yaffs_Spare *spare);
+ int (*readChunkFromNAND) (struct yaffs_DeviceStruct *dev,
+ int chunkInNAND, __u8 *data,
+ yaffs_Spare *spare);
+ int (*eraseBlockInNAND) (struct yaffs_DeviceStruct *dev,
+ int blockInNAND);
+ int (*initialiseNAND) (struct yaffs_DeviceStruct *dev);
+ int (*deinitialiseNAND) (struct yaffs_DeviceStruct *dev);