Oh, the many joys of MTD...
Nicolas Pitre
nico at cam.org
Thu Mar 8 11:27:03 EST 2001
On Thu, 8 Mar 2001, Kevin Jacobs wrote:
> Hello everyone!
>
> I'm new to working on MTD and would like to start by thanking everyone who
> has contributed to it. Its a fine addition to Linux and has made my life
> much easier. However, I am having a few problems and was hoping for some
> kinds souls to enlighten me a little.
>
> Let me also say that I am somewhat new to hardware driver development and
> have some rather odd gaps in my knowledge.
>
> My first questions is likely something fairly basic. I've read over much of
> the MTD source and it seems that many of the erase and write functions do
> not deal with concurrent access and CPU cache issues. What happens when a
> {read,write,erase} request comes in for a sector that is being
> {written,erased}?
Those are exclusively protected by state machines and locks. For example,
see the usage of chip->state in cfi_cmdset_0001.c.
> Also, is it assumed that the memory mapped for MTD devices will not be
> cached by the CPU? If so, is it feasible to add support. If not, where is
> code to flush/update the cache after a write or erase operation?
The device mapping is done with the ioremap() call which is responsible for
providing a non-cacheable mapping.
Nicolas
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list