kernel unable to correctly write to NAND. says bad block.

Hi guys I have a MT29F16G08CBACAWP 2GiB chip with my am335x, uboot is able to erase/read/write to the NAND(only <0.1% bad blocks), but the kernel (3.2.0 from ti sdk) is complaining about its bad block issue.

I have also tried to use mtd-utils from ubuntu image. but flash_eraseall says 99% blocks are bad. and throw I/O error. I have tried at least with 5 chips, but no luck, exactly same issue.

Anyone had similar issue before? Give some debug directions or 2 cents? Thanks!

Kernel message is as follow:


[ 1.168609] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.175933] omap2-nand driver initializing
[ 1.180511] ONFI flash detected
[ 1.183959] ONFI param page 0 valid
[ 1.187591] NAND device: Manufacturer ID: 0x2c, Chip ID: 0x48 (Micron MT29F16G08CBACAWP)
[ 1.196258] Creating 7 MTD partitions on “omap2-nand.0”:
[ 1.201843] 0x000000000000-0x000000080000 : “SPL”
[ 1.206756] mtd: partition “SPL” doesn’t end on an erase block – force read-only
[ 1.215972] 0x000000080000-0x000000180000 : “SPL.backup1”
[ 1.221649] mtd: partition “SPL.backup1” doesn’t start on an erase block boundary – force read-only
[ 1.232452] 0x000000180000-0x000000380000 : “SPL.backup2”
[ 1.238098] mtd: partition “SPL.backup2” doesn’t start on an erase block boundary – force read-only
[ 1.248931] 0x000000380000-0x000000740000 : “U-Boot”
[ 1.254150] mtd: partition “U-Boot” doesn’t start on an erase block boundary – force read-only
[ 1.264678] 0x000000740000-0x000000760000 : “U-Boot Env”
[ 1.270202] mtd: partition “U-Boot Env” doesn’t start on an erase block boundary – force read-only
[ 1.280944] 0x000000760000-0x000000c60000 : “Kernel”
[ 1.286163] mtd: partition “Kernel” doesn’t start on an erase block boundary – force read-only
[ 1.296813] 0x000000c60000-0x000080000000 : “File System”
[ 1.302490] mtd: partition “File System” doesn’t start on an erase block boundary – force read-only