public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Supporting flash that is locked by default
@ 2004-09-25  1:23 Todd Poynor
  2004-09-25  2:18 ` Christopher Hoover
  0 siblings, 1 reply; 7+ messages in thread
From: Todd Poynor @ 2004-09-25  1:23 UTC (permalink / raw)
  To: linux-mtd

Various flash chips may be locked (at a chip or block level) at power-on 
(perhaps depending on the board wiring), requiring an unlock before 
writing to the device.  It doesn't seem unreasonable to require one to 
run flash_unlock on appropriate partitions before writing to the device, 
at least in the case of initially mounting filesystems during system 
startup.  Platforms that power-cycle the device during a suspend/resume 
make this a little more complicated, since there's not really a standard 
way to insert the necessary flash_unlock commands into the system resume 
sequence, especially for a writeable root filesystem.   (For example, 
the Intel XScale PXA27x uses K3 StrataFlash, which powers up with all 
blocks locked and power-cycles the chip on suspend.)

This could all be handled inside the kernel, unlocking blocks as written 
to (if the block has not been explicitly locked).  But keeping track of 
which blocks are supposed to be unlockable is a messy business, and 
could fairly be accused of placing intelligence or policy in the kernel 
that is better left to userspace.  I don't, however, have an easy answer 
for how to handle the suspend/resume case.  The embedded engineers I've 
talked to felt this was a hardware detail the kernel should take care of 
for them, and it might not be that bad of an idea to have the kernel 
restore the flash to pre-suspend state by keeping track of 
previously-unlocked blocks.

So I thought I'd ask whether an architectural direction for linux-mtd 
has been set in this regard, or whether anybody has an opinion on this. 
  Thanks for any insight you can add,

-- 
Todd Poynor
MontaVista Software

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

end of thread, other threads:[~2004-10-08  1:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-25  1:23 Supporting flash that is locked by default Todd Poynor
2004-09-25  2:18 ` Christopher Hoover
2004-09-25 10:33   ` David Woodhouse
2004-09-28 23:43     ` Todd Poynor
2004-09-29  0:57       ` Nicolas Pitre
2004-09-29  2:00         ` Todd Poynor
2004-10-08  1:34     ` Todd Poynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox