Re: Problem writing to NOR flash

Andy Hawkins
2004-07-26T15:39:38Z

Hi,

On Mon, 2004-07-26 at 16:00, Dmitry A. Fedorov wrote:
> I have use the same cmdset (exactly) but single (interleave 1) 16 bit
> wide chip Am29LV640. No problems yet with backported code.

I've been doing a bit of digging now. The chip in question is an ST
M29W320DB (32MBit)

do_xxlock_oneblock is called, with an address of 0. However, this is
translated in the function to an address of ffc00002. This address is
then (eventually) passed into map_write16, which adds the virtual
address of the flash onto this address...

This to me appears to be invalid, but I'm not entirely sure what
*should* be happening here. The chip's start address is added on to the
address inside do_xxlock_oneblock (although this is zero), and then the
virtual address is added on again. However, the translation doesn't
appear correct to me:

adr = ((adr & ~0xffff) | 0x2) + ~0x3fffff;

As you can probably tell, I don't fully understand how the code is
*supposed* to work, so it's difficult to know exactly what is going
wrong here.

Thanks.

Andy