[U-Boot] [PATCH][v2] driver/ifc:Change accessor function to take care of endianness

York Sun yorksun at freescale.com
Tue Jan 21 07:49:04 CET 2014


Dear Wolfgang,

On Jan 20, 2014, at 10:34 PM, Wolfgang Denk wrote:

> Dear Scott,
> 
> In message <20140121054228.DE99438201D at gemini.denx.de> I wrote:
>> 
>> I fear that more IP blocks will follow that have similar requirements,
>> and if we implemnt similar wrappers for each of them separately, we
>> will have a mess of hard to maintain code.  For example, it will then
>> be impossible to share common parts of code because driver A uses
>> A_out32() and driver B uses B_out32().
>> 
>> We should rather try and find a generic solution where the same
>> functions can be used by mulltiple drivers which have the same needs.
> 
> On second thought, I also think we should avoid solutions where the
> BE/LE test has to be done for each and every I/O accessor call again
> and again.  We should rather do this just once, and for example set
> function pointers as needed (hoping that this driver will only be
> needed after relocation, so we have writable data segment).

I like the idea of setting it just once, but I don't see how to implement it. A pointer is probably not the solution, because we do need some drivers before relocation.

York



More information about the U-Boot mailing list