
On 1/26/07, Peter.Pearse peter.pearse@arm.com wrote:
As I said to Grant
But I just found the original thread for the inclusion of this code
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.