Re: How to cope with locked flash

Todd Poynor
2005-09-16T01:37:24Z

Jörn Engel wrote:

> Next best thing, imo, would be the mtd mapping driver. JFFS2 should
> stay clear of this, if possible. We should aim to isolate hardware
> stuff to drivers/mtd/ and keep fs/* unaware. Some things like wbuf
> require fs knowledge, but unlock doesn't.

Last time I sent a chip-driver-level patch (which knows the power-up
locking behavior for the particular chips, it was rather ugly since it
needed a notifier to know when writeable partitions were added), at
which time the JFFS2 alternative was suggested. An explicit call from
the map driver, after parititions are registered, to the chip driver
should work, avoiding the need for a notifier, and the map driver has
the "master" struct mtd handle needed for info on the locking behavior
of the chip (unlock is slow on some chips, best avoided if not needed).
I'll float a patch soon.

--
Todd