CFI with 4 x8/x16 devices on a 32-bit bus

Kári Davíðsson kd at flaga.is
Sat Apr 14 12:54:11 EDT 2001


Hi,

> -----Original Message-----
> From: Joakim Tjernlund [mailto:joakim.tjernlund at lumentis.se]
> Sent: 12. apríl 2001 13:53
> To: Kári Davíðsson; mtd at infradead.org
> Subject: RE: CFI with 4 x8/x16 devices on a 32-bit bus 
> 
> 
> Hi
> 
> I been all the time wrong! I just discovered that hexl-mode i 
> emacs is broken!
> Emacs in hexl-mode displays 81ff81ff81ff ... and od -x says 
> fffffff ...
> 
> Sorry about that.
> 
> While I am at it perhaps someone can enlighten me somewhat ...
> 
> I am a bit confused about how add_mtd_device() and 
> add_mtd_partitions() work.
> Looking in nora.c it looks like you can partition a flash by doing 
> a few calls to add_mtd_device() with different offsets, but 
> if you can do
> that with add_mtd_device(), what's the point with 
> add_mtd_partitions()?

To call a few calls to add_mtd_device() 8-)

> 
> I am missing something here, can someone explain when and how 
> you are supposed to
> use these two functions?

Well as you can see in add_mtd_partition() it is not a question of just
calling a couple of times to add_mtd_device(). You need set up the
correspding
device structeres etc, etc, add the virtual regions if you wan't to use
them etc,
etc....

I find it a good abstractation to add partitions to flash devices. After
you
add the partition you just access it like any other flash device, i.e.
you do not
have to know that you are accessing only part of a flash device
(partition) 
rather than the whole device it self. It is all abstracted for you and
makes the
world a much nicer place 8-).

To summary: It is a good way to convert a simple partition description
structures
into device description structures so that the rest of the code does not
have to
know the difference of devices and partitions.

K.D.

> 
>  Jocke


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



More information about the linux-mtd mailing list