[linux_mtd]bad eraseblock in nandflash when booting linux-2.6.12
JianZhang
JianZhang at SoftHome.net
Fri Jul 29 05:40:31 EDT 2005
Hi!
I am running 2.6.12 on EDB9312 platform, using Samsung nand flash K9F1208UOM. and the GPIO pins connect to nand
flash's ALE,CLE,NCE,but the BUSY pin is float.so i declared" this->dev_ready = NULL;" in function"int __init ep9312_init (void)".
Now,it boot with NFS,the kernel can detect the nand flash,but it report there are many "Bad eraseblock",The
following is part of my booting info:
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 6 at 0x00018000
Bad eraseblock 43 at 0x000ac000
Bad eraseblock 68 at 0x00110000
Bad eraseblock 101 at 0x00194000
Bad eraseblock 159 at 0x0027c000
Bad eraseblock 171 at 0x002ac000
...
(maybe the total"bad block" is 160)
Bad eraseblock 3951 at 0x03dbc000
Bad eraseblock 4011 at 0x03eac000
Bad eraseblock 4021 at 0x03ed4000
Bad eraseblock 4048 at 0x03f40000
Bad eraseblock 4074 at 0x03fa8000
cmdlinepart partition parsing not available
sing static partition definition
reating 1 MTD partitions on "edb9312-nand":
0x00000000-0x04000000 : "EP9312 Nand Flash"
...
/******************************/
But when i reboot system it report:
/******************************/
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 1 at 0x00004000
Bad eraseblock 12 at 0x00030000
Bad eraseblock 48 at 0x000c0000
Bad eraseblock 83 at 0x0014c000
Bad erasblock 89 at 0x00164000
Bad eraseblock 110 at 0x001b8000
...
Bad eraseblock 4046 at 0x03f38000
Bad eraseblock 4051 at 0x03f4c000
Bad eraseblock 4079 at 0x03fbc000
Bad eraseblock 4090 at 0x03fe8000
/******************************/
It seem that the location of bad eraseblocks is random in every booting time.
I want to use flash_eraseall to erase all block,but it skiped the bad block.so i hacked ../util/flash_eraseall.c
by comment out the bbttest:
../util/flash_eraseall.c
main()
{
...
/***comment out not to check bbt**/
/*
if (bbtest) {
...
}
*/
if (!quiet) {
...
}
compile it and make out flash_eraseall_hack
/***************************************/
~#flash_eraseall_hack -j /dev/mtd5
MTD_open
MTD_ioctl
MTD_ioctl
rasing 16 KibyMTD_ioctl
e @ 0 -- 0 % complete.MTD_ioctl
leanmarker wriMTD_ioctl
ten at 0.
...
Erasing 16 MTD_ioctl
ibyte @ 80000 -nand_erase: Failed erase, page 0x00000680
0 % complete. Cleanmarker wriMTD_ioctl
ten at 80000.
....
/************************************/
there is a little "Failed erase" in this operation. but also it is random in every time i do flash_eraseall_hack.
Now i don't know the problem is caused by my nand flash device driver or MTD driver.can anybody help me!
Thanks advanced!
Best Regards,
JianZhang
JianZhang at SoftHome.net
2005-07-29
More information about the linux-mtd
mailing list