CFI Extended (Intel P30) problems on an ARM PXA255

Dan Merillat harik.attar at gmail.com
Wed May 3 22:26:45 EDT 2006


I originally sent this to the linux-arm list, but it's looking more
and more like either a MTD issue, or a hardware issue with our board.

We have a custom PXA255 board, based on the generic Intel reference
design.  Nothing very
complex at all.   RAM, Strataflash (P30), JTAG and a serial port is
all I have active at this point.

Everything works correctly, until I try to write to the filesystem. 
As soon as I do, I start getting JFFS corruption notices.  It's fairly
obvious what's wrong: All reads are returning 0x0080, the 'Ok' status
bit.   I can break in the jtag, write a reset to the flash, and
continue, and new reads work properly, until I write again (or the
original write retries).

I thought it might be a memory timing issue, but I pulled the timing
register (MSC0) and applied the faster timings to u-boot, and it can
still read and write the flash properly.    System speed and memory
speed are also the same (200mhz/100mhz) for both u-boot and linux.

I started from the gumstix.org tree, so I'm currently using their
static-partitions patch until I can patch something better in.  It
only touches the maps/ directory to create their MTD partition info.

trimmed dmesg:

Linux version 2.6.15gum (harik§taz) (gcc version 3.4.5) #5 Tue May 2
18:43:14 EDT 2006
CPU: XScale-PXA255 Ä69052d06Ü revision 6 (ARMv5TE)
Machine: The Gumstix Platform
Memory policy: ECC disabled, Data cache writeback
Memory clock: 99.53MHz (*27)
Run Mode clock: 199.07MHz (*2)
Turbo Mode clock: 199.07MHz (*1.0, inactive)
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists
Kernel command line: console=ttyS0,115200n8 rootfstype=jffs2
reboot=cold,hard init=/bin/sh root=1f01
...
Probing Gumstix Flash ROM at physical address 0x00000000 (16-bit bankwidth)
Gumstix Flash ROM: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Using static partitions on Gumstix Flash ROM
Creating 2 MTD partitions on "Gumstix Flash ROM":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x02000000 : "RootFS"

....

Write error in obliterating obsoleted node at 0x00102318: -30
Node header CRC failed at 0030171c. But it must have been OK earlier.
Node was: ä 0080, 2080, 00800080, 00800080 ü
Node totlen on flash (0x00800080) != totlen from node ref (0x00000030)


What are the exit points from mtd erase/write operations?  I was
thinking of putting a test-read of phys 0x0 and comparing to 0x0080 to
see if I'm getting real data, and if not, to
re-send the CFI_RESET.  I just can't follow the internals well enough
to figure where that's happening.

I have not ruled out hardware, but I have tested it quite a bit with
the CFI driver of u-boot and I havn't seen this problem there.

Thanks in advance for any help.

--Dan




More information about the linux-mtd mailing list