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

Prabhakar Kushwaha prabhakar at freescale.com
Tue Jan 21 07:51:31 CET 2014


On 1/21/2014 12:04 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).
>
>

Thanks Wolfgang for this suggestion.

As far I understand, you are suggesting to have global structure with 
function pointer to accessor function depending upon IP's endiannes..
but i afraid,  for IFC we do have scenario where these accessor function 
are used before relocation.

Regards,
Prabhakar





More information about the U-Boot mailing list