NOR flash S29WS-N: buffered write doesn't work

Guennadi Liakhovetski lg at denx.de
Fri Mar 28 03:13:39 EDT 2008


Hi all

The problem I'm experiencing is not in Linux, but in U-Boot, but I 
thought, maybe someone knows how to handle these chips on this list.

I've got the following problem: on a system with the Spansion S29WS256N 
NOR flash the buffered write mode doesn't work. Attempts to use 
CFG_FLASH_USE_BUFFER_WRITE produce

Writing to Flash... Flash buffer write timeout at address a1ff8000 data 
86c686c6Timeout writing to Flash

Interestingly, I can write up to one buffer (32 x 16-bit words) of data 
correctly at the beginning of a sector, but not the second or any further 
buffer.

I also noticed, that BDI2000 uses the MIRRORX16 flash type for these 
"MirrorBit" flash chips, but for "newer" ones according to a comment in 
the bdi2000 manual, one has to use the S29M32X16 type, "because of the 
used unlock address offset". Which also hints at differences between this 
and "older" chips.

Studying the datasheets of S29WS-N and S29GL-N indeed there is a 
difference - but not in unlock offsets, but in the address, where the data 
length has to be written. In S29GL-N the block length is written at the 
beginning of the respective erase sector, in S29WS-N - at the write 
address! And the present mtd driver - in U-Boot and in Linux - indeed 
writes at the sector start. I've changed the driver to write at the data 
address - but this didn't change anything. I verified that indeed the 
addressses are calculated correctly, and I still can write the first block 
in a sector - but not the second. For example, in a 32KB big sector at 
0xa1ff8000 a write

cp.b 0x80800000 0xa1ff8000 0x40

works, but

cp.b 0x80800000 0xa1ff8040 0x40

doesn't. In the latter case the standard procedure is to write the "length 
- 1", i.e., 31 (in words) to 0xa1ff8000 for all blocks in this sector. I 
modified the driver to write it to 0xa1ff8040, and it didn't help.

Does anyone know the problem and how shall it be solved?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de



More information about the linux-mtd mailing list