public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Abstractation
@ 2001-03-09 13:33 Kári Davíðsson
  2001-03-09 13:44 ` Abstractation David Woodhouse
  2001-03-09 14:46 ` Abstractation Florian Schirmer / TayTron
  0 siblings, 2 replies; 3+ messages in thread
From: Kári Davíðsson @ 2001-03-09 13:33 UTC (permalink / raw)
  To: mtd

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@infradead.org

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

* Re: Abstractation
  2001-03-09 13:33 Abstractation Kári Davíðsson
@ 2001-03-09 13:44 ` David Woodhouse
  2001-03-09 14:46 ` Abstractation Florian Schirmer / TayTron
  1 sibling, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2001-03-09 13:44 UTC (permalink / raw)
  To: Kári Davíðsson; +Cc: mtd


kd@flaga.is said:
>  I need to add a cfi_cmdset_0003 to support a Intel chip that we have
> in our boards.

You'll probably find it works if you just hack cfi_probe to invoke 
cfi_cmdset_0001 instead. See the list archives - this came up quite 
recently.

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

You need to handle multiple chips interleaved on a wide bus anyway. 

Numchips isn't too difficult and by doing it at the command set level we 
eliminate the need for external wrapper functions which make multiple calls 
to the single-chip version of the access function.

--
dwmw2




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

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

* Re: Abstractation
  2001-03-09 13:33 Abstractation Kári Davíðsson
  2001-03-09 13:44 ` Abstractation David Woodhouse
@ 2001-03-09 14:46 ` Florian Schirmer / TayTron
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Schirmer / TayTron @ 2001-03-09 14:46 UTC (permalink / raw)
  To: Kári Davíðsson, mtd

Hi,

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

I posted a hack for this some days ago. Just set P_ID to 1 (instead of 3)
right after it was filled and everythings works fine with the cmdset_0001
module.

Hope that helps,
    Florian Schirmer



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

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

end of thread, other threads:[~2001-03-09 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-09 13:33 Abstractation Kári Davíðsson
2001-03-09 13:44 ` Abstractation David Woodhouse
2001-03-09 14:46 ` Abstractation Florian Schirmer / TayTron

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