Problem with Micron 256 MB NAND on 440EPx

Andrew E. Mileski andrewm at isoar.ca
Thu Apr 17 14:39:53 EDT 2008


I'm looking for some pointers in the right direction with this problem
I'm having with Micron 256 MB NAND part MT29F2G08AACWP:C with a JFFS2
filesystem on a AMCC PowerPC 440EPx board using the NDFC driver.

This NAND part has a 2 KB page size, 64 byte OOB area, 128 KB block
size.  I'm basically using the a stock Sequoia eval board code in a Denx
kernel, but with a 64 byte ECC layout copied from nand_oob_64 in
drivers/mtd/nand/nand_base.c

On any write over the 2 KB page size, the Linux kernel reports errors on
trying to verify 2 KB pages after the first.  It seems writes of 2 KB or
less are fine.

For example:
   dd if=/dev/urandom of=test bs=2k count=2

Write verify error (ECC correction failed) at 0e480000. Wrote:
00000000: 19 85 e0 02 00 00 04 44 c0 83 e7 3a 00 00 00 03
...
Read back:
00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00000040: 19 85 e0 02 00 00 04 44 c0 83 e7 3a 00 00 00 03

Notice that the data appears to be "offset" by 64 bytes, which just
happens to be the size of the OOB, but that could be a coincidence.

I've tried increasing bus timings to max with no change in behavior.
Reducing NR_SCAN_PAGES to 1 from 4 in fs/jffs2/wbuf.c reduces the
"offset" to 28 bytes (I was seeing 152 byte OOB operations, which seemed
odd when there are only 64 bytes, so I tried this).

Also as a secondary problem, how do set the NAND_BBT_SCAN2NDPAGE flag?
I don't see how to reach the BBT option field via the structures passed
to platform_device_register().

Thanks.

-- 
Andrew E. Mileski



More information about the linux-mtd mailing list