Hi, I'm using a 4GB(4 x 1GB NAND chips) NAND partition on my at91rm9200 ARM
board, recently, I found half of my NAND eraseblocks were reported as "bad
block" by yaffs2(v1.59, v1.48) at mount time. I think those blocks must be
marked "BAD" by mistake, because those NAND chips are quite new and show few
bad blocks by MTD driver at boot time:
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
4 NAND chips detected
Scanning device for bad blocks
Bad eraseblock 1422 at 0x0b1c0000
Bad eraseblock 3085 at 0x181a0000
Bad eraseblock 6618 at 0x33b40000
Bad eraseblock 7773 at 0x3cba0000
Bad eraseblock 8055 at 0x3eee0000
Bad eraseblock 8785 at 0x44a20000
Bad eraseblock 12568 at 0x62300000
Bad eraseblock 13067 at 0x66160000
Bad eraseblock 13431 at 0x68ee0000
Bad eraseblock 14546 at 0x71a40000
Bad eraseblock 15241 at 0x77120000
Bad eraseblock 15525 at 0x794a0000
Bad eraseblock 16075 at 0x7d960000
Bad eraseblock 24212 at 0xbd280000
Bad eraseblock 25755 at 0xc9360000
Bad eraseblock 28638 at 0xdfbc0000
Bad eraseblock 28639 at 0xdfbe0000
Bad eraseblock 28704 at 0xe0400000
Bad eraseblock 29231 at 0xe45e0000
Bad eraseblock 29573 at 0xe70a0000
Bad eraseblock 29892 at 0xe9880000
Bad eraseblock 30116 at 0xeb480000
Bad eraseblock 32735 at 0xffbe0000
Creating 1 MTD partitions on "NAND 1GiB 3,3V 8-bit":
0x00000000-0xfffe0000 : "NAND Data Storage"
The flowing badblocks are reported by yaffs2:
...
find next checkpt block: search: block 32765 oid 0 seq 0 eccr 0
find next checkpt block: search: block 32766 oid 0 seq 0 eccr 0
find next checkpt block: search: block 32767 oid 0 seq 0 eccr 0
found no more checkpt blocks
checkpoint byte count 0
restore exit: isCheckpointed 0
block 1423 is bad
block 3086 is bad
block 6619 is bad
block 7774 is bad
block 8056 is bad
block 8786 is bad
block 12569 is bad
block 13068 is bad
block 13432 is bad
block 14547 is bad
block 15242 is bad
block 15526 is bad
block 16076 is bad
block 16385 is bad <- first bad block of last two chips
block 16386 is bad
block 16388 is bad
block 16389 is bad
block 16390 is bad
...
block 32737 is bad
block 32738 is bad
block 32739 is bad
block 32742 is bad
block 32743 is bad
block 32745 is bad
block 32746 is bad
block 32747 is bad
block 32750 is bad
block 32752 is bad
block 32753 is bad
block 32755 is bad
block 32756 is bad
block 32758 is bad
block 32759 is bad
block 32760 is bad
block 32761 is bad
block 32763 is bad
block 32764 is bad
block 32765 is bad
block 32766 is bad
As we can see, the first two NAND chips are reported correctlly, but the
last two chips are reported 99% bad blocks, but the freespace of 4GB
partiton is 3.5GB NOT 2GB:
ARM nand]# du
2 ./lost+found
4 .
[ARM nand]# df
Filesystem 1k-blocks Used Available Use% Mounted on
tmpfs 14984 4 14980 0% /dev
/dev/mtdblock6 4194176 620032 3574144 15% /mnt/nand
I have used nand_erase to erase entire NAND partiton but the problem
remains.
Is it a yaffs bug? If it's not, how can I low-level format it (to clear
those bad block marks) ?
Thanx.
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/