Dear Christian, "Christian Eggers" <[EMAIL PROTECTED]> writes:
> 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 )? Largely not. But be carefull. Besides big and little endian CPUs we also have controllers that operate in big or little endian (see CFG_OHCI_BE_CONTROLLER), and then there are PCI controllers whose registers need to be accessed as little endian (CFG_OHCI_SWAP_REG_ACCESS). But your right, there is no real for LITTLEENDIAN. > 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. Right. Patches cleaning this up are more than welcome! Please note that cleaning up USB drivers under the cpu/ directory is a waste of time though. Boards using these drivers should be converted to use the generic infrastructure in drivers/usb/ instead. Best regards Markus Klotzbuecher -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users