- // /ram
- memset(&ramDev,0,sizeof(ramDev));
- ramDev.nBytesPerChunk = 512;
- ramDev.nChunksPerBlock = 32;
- ramDev.nReservedBlocks = 2; // Set this smaller for RAM
- ramDev.startBlock = 0; // Can use block 0
- ramDev.endBlock = 127; // Last block in 2MB.
- //ramDev.useNANDECC = 1;
- ramDev.nShortOpCaches = 0; // Disable caching on this device.
- ramDev.genericDevice = (void *) 0; // Used to identify the device in fstat.
- ramDev.writeChunkWithTagsToNAND = yramdisk_WriteChunkWithTagsToNAND;
- ramDev.readChunkWithTagsFromNAND = yramdisk_ReadChunkWithTagsFromNAND;
- ramDev.eraseBlockInNAND = yramdisk_EraseBlockInNAND;
- ramDev.initialiseNAND = yramdisk_InitialiseNAND;
-
- // /boot
- memset(&bootDev,0,sizeof(bootDev));
- bootDev.nBytesPerChunk = 512;
- bootDev.nChunksPerBlock = 32;
- bootDev.nReservedBlocks = 5;
- bootDev.startBlock = 0; // Can use block 0
- bootDev.endBlock = 63; // Last block
- //bootDev.useNANDECC = 0; // use YAFFS's ECC
- bootDev.nShortOpCaches = 10; // Use caches
- bootDev.genericDevice = (void *) 1; // Used to identify the device in fstat.
- bootDev.writeChunkWithTagsToNAND = yflash_WriteChunkWithTagsToNAND;
- bootDev.readChunkWithTagsFromNAND = yflash_ReadChunkWithTagsFromNAND;
- bootDev.eraseBlockInNAND = yflash_EraseBlockInNAND;
- bootDev.initialiseNAND = yflash_InitialiseNAND;
- bootDev.markNANDBlockBad = yflash_MarkNANDBlockBad;
- bootDev.queryNANDBlock = yflash_QueryNANDBlock;
-
-
-
- // /flash
+ // /ram1 ram, yaffs1
+ memset(&ram1Dev,0,sizeof(ram1Dev));
+ ram1Dev.totalBytesPerChunk = 512;
+ ram1Dev.nChunksPerBlock = 32;
+ ram1Dev.nReservedBlocks = 2; // Set this smaller for RAM
+ ram1Dev.startBlock = 0; // Can use block 0
+ ram1Dev.endBlock = 127; // Last block in 2MB.
+ //ram1Dev.useNANDECC = 1;
+ ram1Dev.nShortOpCaches = 0; // Disable caching on this device.
+ ram1Dev.genericDevice = (void *) 0; // Used to identify the device in fstat.
+ ram1Dev.writeChunkWithTagsToNAND = yramdisk_WriteChunkWithTagsToNAND;
+ ram1Dev.readChunkWithTagsFromNAND = yramdisk_ReadChunkWithTagsFromNAND;
+ ram1Dev.eraseBlockInNAND = yramdisk_EraseBlockInNAND;
+ ram1Dev.initialiseNAND = yramdisk_InitialiseNAND;
+
+ // /M18-1 yaffs1 on M18 nor sim
+ memset(&m18_1Dev,0,sizeof(m18_1Dev));
+ m18_1Dev.totalBytesPerChunk = 1024;
+ m18_1Dev.nChunksPerBlock =248;
+ m18_1Dev.nReservedBlocks = 2;
+ m18_1Dev.startBlock = 0; // Can use block 0
+ m18_1Dev.endBlock = 31; // Last block
+ m18_1Dev.useNANDECC = 0; // use YAFFS's ECC
+ m18_1Dev.nShortOpCaches = 10; // Use caches
+ m18_1Dev.genericDevice = (void *) 1; // Used to identify the device in fstat.
+ m18_1Dev.writeChunkToNAND = ynorif1_WriteChunkToNAND;
+ m18_1Dev.readChunkFromNAND = ynorif1_ReadChunkFromNAND;
+ m18_1Dev.eraseBlockInNAND = ynorif1_EraseBlockInNAND;
+ m18_1Dev.initialiseNAND = ynorif1_InitialiseNAND;
+ m18_1Dev.deinitialiseNAND = ynorif1_DeinitialiseNAND;
+
+
+ // /flash (yaffs2)