Wrong flash type in m25p80 driver

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue May 18 08:12:15 EDT 2010


On 18.05.2010 08:37, Shachar Shemesh wrote:
> Carl-Daniel Hailfinger wrote:
>> The ST M25P80 has a minimum write size of 1 bit (datasheet is a bit
>> unclear, could also be 1 byte) and a maximum write size of 256 bytes.
>>   
> I have not studies the M25P80 data sheet, but did the M25P32 and the
> MX25L6405D chips, and I believe all SPI flahses handled by the m25p80
> driver behave the same in that regard (which is why they were clamped
> together to begin with).
>
> The minimal "program" length is 1 byte, but since a program can only
> change a 1 bit into 0, effectively, setting a word to "11...101...11",
> where the zero is at the bit you want to set, will program 1 bit.

Yes. The situation is a bit complicated. Some flash chips will not
accept further writes to a location that has been written once even if
those further writes would only change more bits to 0. Such chips have
true 1 byte granularity. Other chips (and AFAIK the whole ST M25 series)
can do at least two writes per byte location as long as the second write
does not set any 0 bit to 1.


>> There's always the option of looking at how flashrom
>> <http://www.flashrom.org/> handles those chips. flashrom an
>> OS-independent userspace tool specialized on chips which are used for
>> BIOS/firmware, but it handles some other flash chips as well.
>>   
> It lists them as "SPI", and the chip support page claims, at least for
> most of them, that it does not know how to erase them
> (http://www.flashrom.org/Supported_hardware).

Thanks for pointing out that this page is misleading. The status "?"
means that it is untested and should work. Only a read "No" means
unsupported. I'll change the wiki to be more readable.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/




More information about the linux-mtd mailing list