Hi,
I'm developing a new MTD/NAND driver under Linux based on highly
customised interface. Unfortunately this means that I cannot re-use the
existing NAND subsystem (although I can reuse the MTD bits).
As a result of this I'm reimplementing read_oob/write_oob etc... from
scratch. They appear to be working in broad terms (I can read/write raw
data acceptably), however I think I've still got some issues relating to
MTD_OOB_AUTO / MTD_OOB_PLACE for oob data placement. As such I don't
seem to be able to use the device with YAFFS.
As soon as I attempt to touch a file on my yaffs partition it goes
haywire, believing that all of the blocks are not erased properly.
Here is some of the output (with full debugging enabled):
yaffs locking c78f9840
yaffs locked c78f9840
yaffs_lookup for 1:foo
yaffs unlocking c78f9840
yaffs_lookup not found
yaffs_create
yaffs_mknod: parent object 1 type 3
yaffs_mknod: making oject for foo, mode 81a4 dev 0
yaffs locking c78f9840
yaffs locked c78f9840
yaffs_mknod: making file
yaffs: Tnodes added
yaffs_MarkSuperBlockDirty() sb = c791ea00
Allocated block 1, seq 4097, 126 left
nandmtd2_ReadChunkWithTagsFromNAND chunk 0 data c79a8000 tags c7955ae0
packed tags obj -1 chunk -1 byte -1 seq -1
ext.tags eccres 0 blkbad 0 chused 0 obj 0 chunk0 byte 0 del 0 ser 0 seq 0
packed tags obj -1 chunk -1 byte -1 seq -1
ext.tags eccres 1 blkbad 0 chused 0 obj 0 chunk0 byte 0 del 0 ser 0 seq 0
Chunk 64 not erased
**>> yaffs chunk 64 was not erased
line 1018 delete of chunk 64
Allocated block 2, seq 4098, 125 left
nandmtd2_ReadChunkWithTagsFromNAND chunk 64 data c79a8000 tags c7955ae0
packed tags obj -1 chunk -1 byte -1 seq -1
ext.tags eccres 0 blkbad 0 chused 0 obj 0 chunk0 byte 0 del 0 ser 0 seq 0
packed tags obj -1 chunk -1 byte -1 seq -1
ext.tags eccres 1 blkbad 0 chused 0 obj 0 chunk0 byte 0 del 0 ser 0 seq 0
Chunk 128 not erased
**>> yaffs chunk 128 was not erased
line 1018 delete of chunk 128
Allocated block 3, seq 4099, 124 left
nandmtd2_ReadChunkWithTagsFromNAND chunk 128 data c79a8000 tags c7955ae0
packed tags obj -1 chunk -1 byte -1 seq -1
ext.tags eccres 0 blkbad 0 chused 0 obj 0 chunk0 byte 0 del 0 ser 0 seq 0
packed tags obj -1 chunk -1 byte -1 seq -1
ext.tags eccres 1 blkbad 0 chused 0 obj 0 chunk0 byte 0 del 0 ser 0 seq 0
Chunk 192 not erased
**>> yaffs chunk 192 was not erased
Here is a copy of /proc/yaffs (from just prior to running the touch
command):
YAFFS built:Jun 14 2010 14:09:20
Device 0 "Stack0"
startBlock......... 0
endBlock........... 127
totalBytesPerChunk. 16384
useNANDECC......... 1
noTagsECC.......... 0
isYaffs2........... 1
inbandTags......... 0
emptyLostAndFound.. 0
disableLazyLoad.... 0
refreshPeriod...... 500
nShortOpCaches..... 10
nReservedBlocks.... 5
nDataBytesPerChunk. 16384
chunkGroupBits..... 0
chunkGroupSize..... 1
nErasedBlocks...... 127
blocksInCheckpoint. 0
nTnodesCreated..... 0
nFreeTnodes........ 0
nObjectsCreated.... 100
nFreeObjects....... 96
nFreeChunks........ 8128
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
allGCs............. 0
passiveGCs......... 0
oldestDirtyGCs..... 0
backgroundGCs...... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
refreshCount....... 1
nBackgroudDeletions 0
Any hints as to where I could have made a mistake?
Regards,
Andre
--
Bluewater Systems Ltd - ARM Technology Solution Centre
Andre Renaud 5 Amuri Park, 404 Barbadoes St
andre@bluewatersys.com PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com New Zealand
Phone: +64 3 3779127 Freecall: Australia 1800 148 751
Fax: +64 3 3779135 USA 1800 261 2934