[U-Boot-Users] Atmel DataFlash hooks.
Grant Likely
grant.likely at secretlab.ca
Fri Jan 26 20:11:02 CET 2007
On 1/26/07, Peter.Pearse <peter.pearse at arm.com> wrote:
> As I said to Grant
>
> > But I just found the original thread for the inclusion of this code
> > (http://blog.gmane.org/gmane.comp.boot-loaders.u-boot)
>
> Search for
>
> [PATCH] DataFlash for AT91RM9200DK board
>
> Especially:-
>
> <snip>
> >
> > In this case I think we should offer an interface which looks
> > to the user like mmeory.
> <snip>
Not all design decision turn out to be good ones. I'm not
particularly fond of this design decision; but I understand the
argument behind it. I really have a problem with is the
implementation. It is DataFlash specific and it adds a set of device
specific hooks to each command. If every other device was added in
the same way, then there would be an absolute rats nest of #ifdef
blocks in the simple memory access routines.
Other storage devices have not gone the route of pretending to be
memory mapped. I think that u-boot needs to settle on one method for
accessing these devices. Either add generic hooks to the mem access
commands so *all* storage devices can be accessed that way; or make
those routines *only* for memory mapped devices.
My vote is to treat DataFlash like a block device, and make sure that
it supports byte-wide access.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195
More information about the U-Boot
mailing list