linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
To: Shachar Shemesh <shachar@shemesh.biz>
Cc: Linux MTD <linux-mtd@lists.infradead.org>,
	Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: Wrong flash type in m25p80 driver
Date: Tue, 18 May 2010 14:12:15 +0200	[thread overview]
Message-ID: <4BF2841F.8000405@gmx.net> (raw)
In-Reply-To: <4BF235AE.3030903@shemesh.biz>

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/

      reply	other threads:[~2010-05-18 12:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-16 15:40 Wrong flash type in m25p80 driver Shachar Shemesh
2010-05-16 18:40 ` Mike Frysinger
     [not found]   ` <4BF041A3.70304@shemesh.biz>
2010-05-16 19:17     ` Mike Frysinger
     [not found]       ` <4BF04DBE.5020309@shemesh.biz>
2010-05-17  4:54         ` Mike Frysinger
2010-05-17 16:50           ` Carl-Daniel Hailfinger
2010-05-18  6:37             ` Shachar Shemesh
2010-05-18 12:12               ` Carl-Daniel Hailfinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF2841F.8000405@gmx.net \
    --to=c-d.hailfinger.devel.2006@gmx.net \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shachar@shemesh.biz \
    --cc=vapier.adi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).