xref: /OK3568_Linux_fs/u-boot/arch/microblaze/include/asm/byteorder.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * include/asm-microblaze/byteorder.h -- Endian id and conversion ops
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  *  Copyright (C) 2003  John Williams <jwilliams@itee.uq.edu.au>
5*4882a593Smuzhiyun  *  Copyright (C) 2001  NEC Corporation
6*4882a593Smuzhiyun  *  Copyright (C) 2001  Miles Bader <miles@gnu.org>
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General
9*4882a593Smuzhiyun  * Public License.  See the file COPYING in the main directory of this
10*4882a593Smuzhiyun  * archive for more details.
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * Written by Miles Bader <miles@gnu.org>
13*4882a593Smuzhiyun  * Microblaze port by John Williams
14*4882a593Smuzhiyun  */
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun #ifndef __MICROBLAZE_BYTEORDER_H__
17*4882a593Smuzhiyun #define __MICROBLAZE_BYTEORDER_H__
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #include <asm/types.h>
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #ifdef __GNUC__
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
24*4882a593Smuzhiyun #  define __BYTEORDER_HAS_U64__
25*4882a593Smuzhiyun #  define __SWAB_64_THRU_32__
26*4882a593Smuzhiyun #endif
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun #endif /* __GNUC__ */
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun #ifdef __MICROBLAZEEL__
31*4882a593Smuzhiyun #include <linux/byteorder/little_endian.h>
32*4882a593Smuzhiyun #else
33*4882a593Smuzhiyun #include <linux/byteorder/big_endian.h>
34*4882a593Smuzhiyun #endif
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #endif /* __MICROBLAZE_BYTEORDER_H__ */
37