linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* protection on cfi-flash
@ 2010-08-05  8:01 Frans Meulenbroeks
  2010-08-24  9:56 ` Gernot Hoyler
  0 siblings, 1 reply; 2+ messages in thread
From: Frans Meulenbroeks @ 2010-08-05  8:01 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have a board with Spansion nor flash, type S29GL01GP. This uses the
cfi-flash driver
In order to avoid accidential erasure of sectors, and hence wanted to
use flash_lock and flash_unlock.
However apparently the mtd driver for this chip does not support lock
and unlock.

U-boot does support protecting the flash (using the protect command)
so it is feasible.
The chip uses cfi_cmdset_0002.c to do its work.

I guess adding lock/unlock to this is technically not too difficult,
but I lack some info on the internals of mtd and how best to do this.
Anyone a suggestion (or maybe some code or a pointer to some code)?

Thanks alot, Frans

PS: I noticed that if I protect the flash in u-boot that flash_erase
will still report success when I invoke it (although of course the
actual data is not erased).
I would expect flash_erase to get some error code in that case and
report it back (or if that is not possible do a readback of the data
to see if the erase was successful).

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-24  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05  8:01 protection on cfi-flash Frans Meulenbroeks
2010-08-24  9:56 ` Gernot Hoyler

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).