public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Problem with Micron 256 MB NAND on 440EPx
@ 2008-04-17 18:39 Andrew E. Mileski
  2008-05-26 19:44 ` Andrew E. Mileski
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew E. Mileski @ 2008-04-17 18:39 UTC (permalink / raw)
  To: linux-mtd

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-26 23:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 18:39 Problem with Micron 256 MB NAND on 440EPx Andrew E. Mileski
2008-05-26 19:44 ` Andrew E. Mileski
2008-05-26 20:36   ` Alessandro Rubini
2008-05-26 23:04     ` Andrew E. Mileski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox