CFI with 4 x8/x16 devices on a 32-bit bus
kd at flaga.is
Sat Apr 14 12:54:11 EDT 2001
> -----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
> 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
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
device structeres etc, etc, add the virtual regions if you wan't to use
I find it a good abstractation to add partitions to flash devices. After
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
rather than the whole device it self. It is all abstracted for you and
world a much nicer place 8-).
To summary: It is a good way to convert a simple partition description
into device description structures so that the rest of the code does not
know the difference of devices and partitions.
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd