1 /*
2  *  linux/include/asm-arm/byteorder.h
3  *
4  * Copyright (C) 2011 Andes Technology Corporation
5  * Shawn Lin, Andes Technology Corporation <nobuhiro@andestech.com>
6  * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
7  *
8  * ARM Endian-ness.  In little endian mode, the data bus is connected such
9  * that byte accesses appear as:
10  *  0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31
11  * and word accesses (data or instruction) appear as:
12  *  d0...d31
13  *
14  * When in big endian mode, byte accesses appear as:
15  *  0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7
16  * and word accesses (data or instruction) appear as:
17  *  d0...d31
18  */
19 
20 #ifndef __ASM_NDS_BYTEORDER_H
21 #define __ASM_NDS_BYTEORDER_H
22 
23 #include <asm/types.h>
24 
25 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
26 #  define __BYTEORDER_HAS_U64__
27 #  define __SWAB_64_THRU_32__
28 #endif
29 
30 #ifdef __NDSEB__
31 #include <linux/byteorder/big_endian.h>
32 #else
33 #include <linux/byteorder/little_endian.h>
34 #endif
35 
36 #endif
37