Hello Zhang, Yes, Pro4.0 does support large page NAND devices, so does Pro5.0 I have got a NAND device with similar configuration as yours (NAND device: Manufacturer ID: 0x20, Chip ID: 0xa1 (ST Micro NAND 128MiB 1,8V 8-bit)) to work on a Pro5.0(2.6.18)/Mobi 5.0(2.6.21) kernel. I haven't tested it on Pro4.0 though.
So I would suggest a switch to Pro5.0 or Mobi kernel if its possible. You could also take a look at this fix http://mlblog.osdir.com/file-systems.yaffs/2006-07/msg00012.shtml Regards, Philby On Thu, 2009-03-26 at 10:42 +0800, shaofeng zhang wrote: > Hi, Philby, > > I tried several steps as you suggested before, but the problem was not > solved by now. and when I mount the jffs2, there are some errors > printed by the kernel. > > and I want to know if the MV Linux Professional Edition 4.0 does match > the LargePage NAND flash or not. You know, when I use the original > source code of the MV Linux, the linux kernel scanned the nand flash > as all the blocks was bad blocks. and my NAND flash info is the > following: > ============ > TI UBL Version: 1.14, Flash type: NAND > Booting PSP Boot Loader > PSPBootMode = NAND > Starting NAND Copy... > Initializing NAND flash... > Manufacturer ID = 0x00000020 > Device ID = 0x000000A1 > Pages Per Block = 0x00000040 > Number of Blocks = 0x00000400 > Bytes Per Page = 0x00000800 > Valid MagicNum found. > NAND Boot success. > DONE > ============ > So I want to find the reasons from this place, maybe there are some > mistake in the configration of the MV linux kernel. So, WIll you give > me some tips about the NAND configration in the MV linux? Such as the > kernel configration, the NAND OOB info, the NAND ECC info, or the > process of the BBT building. > Thank you. > > Best Wishes, > Zhang > > 2009/3/23 Philby John <pj...@in.mvista.com> > Zhang, > > Please keep the mailing list in the loop, someone might > have a solution > or could use your solution. > > On Mon, 2009-03-23 at 11:18 +0800, shaofeng zhang wrote: > > Dear Sir, > > Sorry, let me introduce myself, my name is Philby. > > > > > I am sorry to reply your email lately. Because we were > rendering our > > lab's wall these days. > > > > And I try to define the YAFFS_IGNORE_TAGS_ECC in the > > fs/yaffs2/yaffs_ecc.h > > but there is still the error message: > > > > r...@xjtuipcevm:~# df -h > > Filesystem Size Used Avail Use% Mounted on > > rootfs 38G 28G 8.0G 78% / > > /dev/root 38G 28G 8.0G 78% / > > none 10M 2.5M 7.6M 25% /dev > > tmpfs 59M 0 59M 0% /tmp > > none 10M 2.5M 7.6M 25% /dev > > tmpfs 59M 0 59M 0% /dev/shm > > /dev/mtdblock4 120M 120M 0 100% /mnt/nand > > And I should tell you that before I modified > > the /drivers/mtd/nand/nand_bbt.c, there is a mistake when > the linux > > kernel is starting: > > my board can automaticly boots from the NAND flash througth > TI UBL and > > U-boot 1.2.0. But when starting the linux kernel, there will > be the > > warning messages like this: > > Starting kernel ... > > Uncompressing > > > > Linux.................................................................................................................................done. > Booting the kernel. > > ................(the pre-messages is omitted) > > NAND device: Manufacturer ID: 0x20, Chip ID: 0xa1 (ST Micro > NAND > > 128MiB 1,8V 8-bit) > > Scanning device for bad blocks > > Bad eraseblock 0 at 0x00000000 > > Bad eraseblock 1 at 0x00020000 > > Bad eraseblock 2 at 0x00040000 > > ........... > > Bad eraseblock 1020 at 0x07f80000 > > Bad eraseblock 1021 at 0x07fa0000 > > Bad eraseblock 1022 at 0x07fc0000 > > Bad eraseblock 1023 at 0x07fe0000 > > ........... > > and My Nand Flash is STMICRO's product: NAND01GR3B2B, whose > > infomation is the following tips: Manufacturer ID = 0x20, > Device ID > > = 0xA1,Pages Per Block = 0x40,Number of Blocks = > 0x400,Bytes Per Page > > = 0x800. > > > > I now that the UBL and U-boot can boot from the NAND flash, > so I > > changed the nand_bbt.c(/drivers/mtd/nand/nand_bbt.c) the > same as the > > u-boot/drives/nand/nand_bbt.c,and the kernel mesage shows > that there > > are few bad blocks in the nand flash. > > > What modifications have you done in nand_bbt.c ? After your > modifications, yaffs2 reports lesser error? How few are the > reported bad > blocks? All NAND based flash devices contain some bad blocks > at > manufacture, so if its really few then it shouldn't be a cause > of worry. > > > > > So what is your advice when you are facing this problem? I > guess > > there may be some faults in the > nand_bbt.c(driveis/mtd/nand)? Is it? > > > I have no idea. But here are some steps you could do to narrow > the cause > of your problem. > > 1) Switch to jffs2 to see if the problem goes away. If yes, > you could > use jffs2 or start debugging the yaffs2 fs code. Turn on > debugging using > echo all > /proc/yaffs before mounting the fs. > > 2) Switch to using btt on RAM instead of flash and see if the > problem > exists? You could so this by changing to this->options |= > (NAND_USE_DATA_ADJACENT_OOB); in function nand_davinci_probe() > -> case > NAND_ECC_HW_SYNDROME: > ie: get rid of the NAND_USE_FLASH_BBT option. > > 3)Erase mtdblock4 partition from Uboot specifying the offset > to the > start of your nand fs and the size of your fs (mtdblock4) > eg: nand erase 0x2400000 0x5e00000 > This will clear all your previous factory marked bbt entries, > so use > this at your discretion. > > > Regards, > Philby > > > > > > > > 2009/3/19 Philby John <pj...@in.mvista.com> > > Zhang, > > > > You could try defining YAFFS_IGNORE_TAGS_ECC > in > > fs/yaffs2/yaffs_ecc.h > > and give it a shot. If this works it would mean, h/w > ECC uses > > up the OOB > > spare area leaving no space > > for YAFFS2 to mark bad blocks hence showing 100% > usage. > > > > Regards, > > Philby > > > > > > > > On Wed, 2009-03-18 at 12:55 -0500, Narnakaje, > Snehaprabha > > wrote: > > > Zhang, > > > > > > > > > > > > Which software codebase/release are you using here > on DM6446 > > EVM? > > > > > > > > > > > > The default NAND configuration for DM6446 EVM is > to use a > > small block > > > NAND flash (with page size = 512bytes) and 1-bit > HW ECC. If > > the driver > > > configuration does not match with what the NAND > device > > expects, all > > > blocks of the NAND device can come back as bad > blocks. In > > which case, > > > the corresponding partition will have 100% space > used. > > > > > > > > > > > > Thanks > > > > > > Sneha > > > > > > > > > > > > > > > > > > ______________________________________________________________________ > > > > From:davinci-linux-open-source-boun...@linux.davincidsp.com > > > > > > [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On > > > Behalf Of shaofeng zhang > > > Sent: Tuesday, March 17, 2009 11:22 PM > > > To: davinci-linux-open-source@linux.davincidsp.com > > > Subject: Problem with YAFFS2 on LargePage NAND > > > > > > > > > > > > > > > Hi, All, > > > > > > > > > > > > > > > > > > I am using a 128MB LargePage Nand Flash on my > DVEVM board > > (DM6446), > > > and when I mount the /dev/mtdblock4 throught > YAFFS2 fs type, > > I found > > > that the use% of my nand is 100% as the following: > > > > > > > > > > > > Filesystem Size Used Avail Use% > Mounted on > > > rootfs 38G 28G 8.0G 78% / > > > /dev/root 38G 28G 8.0G 78% / > > > none 10M 2.5M 7.6M 25% /dev > > > tmpfs 59M 0 59M 0% /tmp > > > none 10M 2.5M 7.6M 25% /dev > > > tmpfs 59M 0 59M > 0% /dev/shm > > > /dev/mtdblock4 120M 120M 0 > 100% /mnt/nand > > > > > > > > > > > > > > > > > > But I first use flash_eraseall to erase > the /dev/mtd4 before > > mounting > > > the /dev/mtdblock4 with YAFFS2 > > > > > > > > > > > > > > > > > > Could anyone tell me some info about the message? > > > > > > > > > Thank you! > > > > > > > > > > > > > > > > > > Best Wishes, > > > > > > > > > Zhang > > > > > > > > > > > _______________________________________________ > > > Davinci-linux-open-source mailing list > > > Davinci-linux-open-source@linux.davincidsp.com > > > > > > > > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > > > > > > > _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source