* CFI Extended (Intel P30) problems on an ARM PXA255
@ 2006-05-04 2:26 Dan Merillat
2006-05-04 2:58 ` Nicolas Pitre
2006-05-05 8:29 ` David Vrabel
0 siblings, 2 replies; 8+ messages in thread
From: Dan Merillat @ 2006-05-04 2:26 UTC (permalink / raw)
To: linux-mtd
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CFI Extended (Intel P30) problems on an ARM PXA255
2006-05-04 2:26 CFI Extended (Intel P30) problems on an ARM PXA255 Dan Merillat
@ 2006-05-04 2:58 ` Nicolas Pitre
[not found] ` <c0c067900605040020n74a74da8s4ed1c3cd0abc3fed@mail.gmail.com>
2006-05-05 8:29 ` David Vrabel
1 sibling, 1 reply; 8+ messages in thread
From: Nicolas Pitre @ 2006-05-04 2:58 UTC (permalink / raw)
To: Dan Merillat; +Cc: linux-mtd
On Wed, 3 May 2006, Dan Merillat wrote:
> 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:
>
> ....
>
> Write error in obliterating obsoleted node at 0x00102318: -30
-30 is -EROFS.
Did you unlock the flash sectors before mounting JFFS2?
Nicolas
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: CFI Extended (Intel P30) problems on an ARM PXA255
2006-05-04 2:26 CFI Extended (Intel P30) problems on an ARM PXA255 Dan Merillat
2006-05-04 2:58 ` Nicolas Pitre
@ 2006-05-05 8:29 ` David Vrabel
2006-05-05 20:48 ` Dan Merillat
1 sibling, 1 reply; 8+ messages in thread
From: David Vrabel @ 2006-05-05 8:29 UTC (permalink / raw)
To: Dan Merillat; +Cc: linux-mtd
Dan Merillat wrote:
> 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).
Perhaps the cache invalidating operation in the MTD map driver you're
using is wrong?
> 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.
If you suspect memory timings may be an issue I would advise slowing the
timings under Linux to the lowest possible. The experiment you describe
here changes two variables (the software and the timings) which is not
good practice.
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CFI Extended (Intel P30) problems on an ARM PXA255
2006-05-05 8:29 ` David Vrabel
@ 2006-05-05 20:48 ` Dan Merillat
2006-05-05 22:07 ` Dan Merillat
0 siblings, 1 reply; 8+ messages in thread
From: Dan Merillat @ 2006-05-05 20:48 UTC (permalink / raw)
To: David Vrabel; +Cc: linux-mtd
On 5/5/06, David Vrabel <dvrabel@arcom.com> wrote:
>
> Perhaps the cache invalidating operation in the MTD map driver you're
> using is wrong?
Ouch, it doesn't appear to have a map->inval_cache member. I'm going
to copy the one from pxa25x-flash.c and see if that fixes it, however,
how could this work with an intel J3 part, but not an intel P30 part?
Same kernel exactly, booting back and forth. It should either work
for both, or fail for both.
> If you suspect memory timings may be an issue I would advise slowing the
> timings under Linux to the lowest possible. The experiment you describe
> here changes two variables (the software and the timings) which is not
> good practice.
I changed one variable. I changed u-boot to use linux's memory
timings, and the problem did not manifest. I would then conclude that
memory timing in and of itself is not the problem.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CFI Extended (Intel P30) problems on an ARM PXA255
2006-05-05 20:48 ` Dan Merillat
@ 2006-05-05 22:07 ` Dan Merillat
0 siblings, 0 replies; 8+ messages in thread
From: Dan Merillat @ 2006-05-05 22:07 UTC (permalink / raw)
To: David Vrabel; +Cc: linux-mtd
> On 5/5/06, David Vrabel <dvrabel@arcom.com> wrote:
> >
> > Perhaps the cache invalidating operation in the MTD map driver you're
> > using is wrong?
And no such luck there, either.
static void pxa25x_map_inval_cache(struct map_info *map, unsigned long from,
ssize_t len)
{
consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE);
}
map_info.inval_cache=pxa25x_map_inval_cache;
Is that wrong? It is getting called after writes to flash.
>
> > If you suspect memory timings may be an issue I would advise slowing the
> > timings under Linux to the lowest possible. The experiment you describe
> > here changes two variables (the software and the timings) which is not
> > good practice.
Tried it the other way around as well, set msc0 to boot-up paranoid
mode: 0x7ff07ff8 or longest waits on all reads/writes and no
burst-mode read. No go, same deal.
# mount / -o remount,rw
# touch /tmp/test
# ls
JFFS2 notice: (1) read_unknown: node header CRC failed at 0x048f70.
But it must have been OK earlier.
Node totlen on flash (0x00800080) != totlen from node ref (0x0000004c)
JFFS2 warning: (1) jffs2_do_read_inode_internal: no data nodes found for ino #47
/bin/sh: ls: Input/output error
(xscale-gdb) monitor long 0xff000000
Read long at 0xff000000 : 0x00800080
(xscale-gdb) monitor short 0xff0000aa = 0xff
Wrote short to 0xff0000aa : 0xff
(xscale-gdb) monitor long 0xff000000
Read long at 0xff000000 : 0xea000212
same deal, I can remount RO and use the filesystem (aside from /bin/ls
which is marked invalid until I reboot)
Trying vanilla 2.6.16.14 now.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-05-05 22:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 2:26 CFI Extended (Intel P30) problems on an ARM PXA255 Dan Merillat
2006-05-04 2:58 ` Nicolas Pitre
[not found] ` <c0c067900605040020n74a74da8s4ed1c3cd0abc3fed@mail.gmail.com>
[not found] ` <Pine.LNX.4.64.0605040909570.28543@localhost.localdomain>
2006-05-04 18:37 ` Dan Merillat
2006-05-04 18:45 ` ext-manjunath.govindashetty
2006-05-04 19:17 ` Jared Hulbert
2006-05-05 8:29 ` David Vrabel
2006-05-05 20:48 ` Dan Merillat
2006-05-05 22:07 ` Dan Merillat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox