Hi
Thank you for your help !
I did the test using nandflash as root filesystem , my yaffs2 filesytem run right.
Now i am suspicious of my nandfash and norflash about static bus :
in my nandflash driver Au1550nd.c
static void au1xxx_nand_select_chip(struct mtd_info *mtd, int chip)
{
switch(chip) {
case -1:
/* deassert chip enable */
au_writel(au_readl(MEM_STNDCTL) & ~(1<<(4+NAND_CS)), MEM_STNDCTL);
break;
case 0:
/* assert (force assert) chip enable */
au_writel(au_readl(MEM_STNDCTL) | (1<<(4+NAND_CS)) , MEM_STNDCTL);
break; default:
BUG();
}
}
-CE manually permitting the NAND controller to do this. Keeping -CE asserted during the
whole sector reads interferes with the NOR flash drivers
so it causes contention on the static bus.
Can you give me any idea ?
howhowwork
2007-01-19
发件人: Charles Manning
发送时间: 2007-01-19 09:12:26
收件人:
yaffs@lists.aleph1.co.uk
抄送: howhowwork; cqdxlijie
主题: Re: [Yaffs] yaffs2 ecc error
On Friday 19 January 2007 13:25, howhowwork wrote:
> Hi ,
>
> I have mips board au1200 with a Samsung K9f1208V 64MB NAND flash which
> is 528bytes/page and nor flash with 32M. i have established a jffs2
> filesystem as root filesystem in nor flash with 32M ,my sytem is ok if only
> use nor flash . now i plan to mount nand flash under jffs2 filesystem . I
> downloaded the newest yaffs2 code from
> "http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs" and place it to linux
> kernel 2.6.11. I select yafss and mtd support from muneconfig. After make,
> I got the error messages
> at the end:
>
> all of transport is passed
>
> 1. i boot my board using jffs2 filesystem as root filesystem
> # cat /proc/mtd
> dev: size erasesize name
> mtd0: 03c00000 00020000 "User11 FS"
> mtd1: 00100000 00020000 "YAMON"
> mtd2: 002c0000 00020000 "raw kernel"
> mtd3: 00800000 00004000 "NAND FSa 0"
> mtd4: 03800000 00004000 "NAND FSa 1"
>
> 2. using the tools "flash_eraseall /dev/mtd6 ",passed
>
> 3. # mount -tyaffs /dev/mtdblock4 /mnt/
> yaffs: dev is 32505860 name is "mtdblock4"
> yaffs: Attempting MTD mount on 31.4, "mtdblock4"
>
> 4. then there are erros when copying data to mnt's directory
> the questions :
> when copy less 120k data , no errors,and the data is correct after i
> reboot however , copying more 100k data ,there are the following errors:
> .........................................
> ** > >mtd ecc error unfixed on chunk 113984:0
> ** > >mtd ecc error unfixed on chunk 113984:1
> ** > >Block 3562 marked for retirement
> ** > > yaffs chunk 114016 was not erased
> ** > > Erasure failed 3563
> ** > > Block 3563 retired
> ......
> ** > > yaffs chunk 416 was not erased
> ** > > Erasure failed 13
> ......
> yaffs tragedy: no more eraased blocks
> !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
> ......
> ** > >mtd ecc error unfixed on chunk 1375:0
> ** > >mtd ecc error unfixed on chunk 1375:1
> ** > >Block 42 marked for retirement
> yaffs tragedy: no more eraased blocks
> !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
> .........................................
> then i try to exc command "df"
> /mnt # df
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/mtdblock0 61440 27308 34132 44% /
> tmpfs 512 60 452 12% /var
> /dev/loop1 1244 1244 0 100% /root/test
> /dev/mtdblock4 57344 57344 0 100% /mnt
>
> exc command "reboot"
> /mnt #df
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/mtdblock0 61440 27308 34132 44% /
> tmpfs 512 60 452 12% /var
> /dev/loop1 1244 1244 0 100% /root/test
> /dev/mtdblock4 57344 57344 0 2% /mnt
>
> why ...
> what is somthing wrong ?
You are getting some ecc errors, most likely because your oob-area data
placement is conflicting with the way your nand driver is working.
I suggest having a very good look at usgae of the oob bytes and looking for
any conflicts.
>
>
> according to some suggustion , I changed my oob placement as following
> :
>
> /* Define default oob placement schemes for large and small page devices
> */ static struct nand_oobinfo nand_oob_8 = {
> .useecc = MTD_NANDECC_AUTOPLACE,
> .eccbytes = 3,
> .eccpos = {0, 1, 2},
> .oobfree = { {3, 2}, {6, 2} }
> };
>
> static struct nand_oobinfo nand_oob_16 = {
> .useecc = MTD_NANDECC_AUTOPLACE,
> .eccbytes = 6,
> .eccpos = {0, 1, 2, 3, 6, 7},
> .oobfree = { {8, 8} }
> };
>
> static struct nand_oobinfo nand_oob_64 = {
> .useecc = MTD_NANDECC_AUTOPLACE,
> .eccbytes = 24,
> .eccpos = {
> 40, 41, 42, 43, 44, 45, 46, 47,
> 48, 49, 50, 51, 52, 53, 54, 55,
> 56, 57, 58, 59, 60, 61, 62, 63},
> .oobfree = { {2, 38} }
> };
> --------------------------------------------------------------------------
>
> While oob placements definition in yaffs_mtdif.c
>
> static struct nand_oobinfo yaffs_oobinfo = {
> .useecc = 1,
> .eccbytes = 6,
> .eccpos = {8, 9, 10, 13, 14, 15}
> };
>
> then i change the struct " nand_oobinfo nand_oob_16" into
> static struct nand_oobinfo nand_oob_16 = {
> .useecc = 1,
> .eccbytes = 6,
> .eccpos = {8, 9, 10, 13, 14, 15},
> };
>
> but the errors is the same as before. Anyclues what
> could be wrong ..
> Any help will be highly appreciated.
>
>
> regards
>
> please help me out ...
>
>
>
>
> howhowwork
> 2007-01-15
.