2 * linux/include/asm-arm/byteorder.h
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>
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:
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:
20 #ifndef __ASM_NDS_BYTEORDER_H
21 #define __ASM_NDS_BYTEORDER_H
23 #include <asm/types.h>
25 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
26 # define __BYTEORDER_HAS_U64__
27 # define __SWAB_64_THRU_32__
31 #include <linux/byteorder/big_endian.h>
33 #include <linux/byteorder/little_endian.h>