[U-Boot-Users] Setting processor endianess for USB modules

Christian Eggers ceggers at gmx.de
Tue Apr 29 19:37:40 CEST 2008


Hello,

I've recognized that a lot of USB code in U-Boot uses the macros
swap_16() and swap_32() which are defined in usb.h. The behaviour
of the macros is controlled by the define LITTLEENDIAN.

Is there a good reason NOT to use the macros provided in
asm/byteorder.h (as in the appropriate code in Linux-2.4 )? 

I think that switching to these functions might be useful in order
to eliminate the need to use the LITTLEENDIAN define for
specifying the byteorder. It seems that LITTLEENDIAN is not
used outside the USB code.

regards

Christian Eggers





More information about the U-Boot mailing list