Abstractation

Kári Davíðsson kd at flaga.is
Fri Mar 9 08:33:44 EST 2001


Hi,

I need to add a cfi_cmdset_0003 to support a Intel chip that we have in
our boards.

Why does I as the cmdset writer have to know all this stuff about the
buswith,
number of chips etc?

Me as a cmdset writer should only be conserned with implementing the
cmdset which is
only affecting one chip at a time, no matter how many there might be on
the bus.

What I am trying to say why is the layering not something like:

--------------------
| Kernel interface |
| has notation of  |
| read / write     |   Sees flash as linear buffer
| to/from linear   |
| buffers (buf)    |  
--------------------
          |
          |
          |
-----------------------  Sees flash as collection of linear sectors
| Mtd knows  the      |  that might be distributed over many flash chips
| mapping from        |
| buffer range to     |
| individual flash    |
| chips/sectors       |
| i.e. where          |
| buf[x] is physically|
-----------------------
          |
          |
          |
--------------------
| cmdset            | sees only one flash chip.
| knows how to write| it knows how to erase sectors, write to them,
read,
| to chip at given  | at word level
| offset for given  |
| chip              |
---------------------

Any way,

Just a thought.

K.D.


To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list