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

Wolfgang Denk wd at denx.de
Tue Jan 21 07:34:57 CET 2014


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).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Mike's Law: For a lumber company employing two men and a cut-off saw,
the marginal product of labor for any number  of  additional  workers
equals  zero  until the acquisition of another cut-off saw. Let's not
even consider a chainsaw.
- Mike Dennison [You could always  schedule the saw, though - ed.]


More information about the U-Boot mailing list