-//////////////////// Device ////////////////////////////////
-
-struct yaffs_DeviceStruct
-{
- // 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
-
- int useNANDECC; // Flag to decide whether or not to use NANDECC
-
-
- void *genericDevice; // Pointer to device context
- // On an mtd this holds the mtd pointer.
-
- // 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);
+/*----------------- Device ---------------------------------*/
+
+struct yaffs_DeviceStruct {
+ struct ylist_head devList;
+ const char *name;
+
+ /* Entry parameters set up way early. Yaffs sets up the rest.*/
+ int nDataBytesPerChunk; /* Should be a power of 2 >= 512 */
+ 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. */
+
+
+ /* Stuff used by the shared space checkpointing mechanism */
+ /* If this value is zero, then this mechanism is disabled */
+
+/* int nCheckpointReservedBlocks; */ /* Blocks to reserve for checkpoint data */
+
+
+ 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 */
+
+ int useNANDECC; /* Flag to decide whether or not to use NANDECC */
+
+ void *genericDevice; /* Pointer to device context
+ * On an mtd this holds the mtd pointer.
+ */
+ void *superBlock;
+
+ /* 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);