diff options
author | wdenk <wdenk> | 2004-02-23 16:11:30 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-02-23 16:11:30 +0000 |
commit | 3f85ce27858c44ee75d3650a53154ebcec0e24f2 (patch) | |
tree | 92513db897b0ffe90354f3b1b9021f04ca4a77b9 /include/usb.h | |
parent | 3c74e32a98187c792edcea3e0e39150de5a8dda6 (diff) | |
download | u-boot-imx-3f85ce27858c44ee75d3650a53154ebcec0e24f2.zip u-boot-imx-3f85ce27858c44ee75d3650a53154ebcec0e24f2.tar.gz u-boot-imx-3f85ce27858c44ee75d3650a53154ebcec0e24f2.tar.bz2 |
* CVS add missing files
* Cleanup compiler warnings
* Fix problem with side effects in macros in include/usb.h
* Patch by David Benson, 13 Nov 2003:
bug 841358 - fix TFTP download size limit
* Fixing bug 850768:
improper flush_cache() in load_serial()
* Fixing bug 834943:
MPC8540 - missing volatile declarations
* Patch by Stephen Williams, 09 Feb 2004:
Add support for Xilinx SystemACE chip:
- New files common/cmd_ace.c and include/systemace.h
- Hook systemace support into cmd_fat and the partition manager
* Patch by Travis Sawyer, 09 Feb 2004:
Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux
Diffstat (limited to 'include/usb.h')
-rw-r--r-- | include/usb.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/usb.h b/include/usb.h index 0008a9a..074e0f1 100644 --- a/include/usb.h +++ b/include/usb.h @@ -234,15 +234,18 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate); #define swap_32(x) ((unsigned long)(x)) #else #define swap_16(x) \ - ((unsigned short)( \ - (((unsigned short)(x) & (unsigned short)0x00ffU) << 8) | \ - (((unsigned short)(x) & (unsigned short)0xff00U) >> 8) )) + ({ unsigned short x_ = (unsigned short)x; \ + (unsigned short)( \ + ((x_ & 0x00FFU) << 8) | ((x_ & 0xFF00U) >> 8) ); \ + }) #define swap_32(x) \ - ((unsigned long)( \ - (((unsigned long)(x) & (unsigned long)0x000000ffUL) << 24) | \ - (((unsigned long)(x) & (unsigned long)0x0000ff00UL) << 8) | \ - (((unsigned long)(x) & (unsigned long)0x00ff0000UL) >> 8) | \ - (((unsigned long)(x) & (unsigned long)0xff000000UL) >> 24) )) + ({ unsigned long x_ = (unsigned long)x; \ + (unsigned long)( \ + ((x_ & 0x000000FFUL) << 24) | \ + ((x_ & 0x0000FF00UL) << 8) | \ + ((x_ & 0x00FF0000UL) >> 8) | \ + ((x_ & 0xFF000000UL) >> 24) ); \ + }) #endif /* LITTLEENDIAN */ /* |