Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
io.h
Go to the documentation of this file.
1 #ifndef __ASM_AVR32_ARCH_AT32AP_IO_H
2 #define __ASM_AVR32_ARCH_AT32AP_IO_H
3 
4 #include <linux/swab.h>
5 
6 #if defined(CONFIG_AP700X_32_BIT_SMC)
7 # define __swizzle_addr_b(addr) (addr ^ 3UL)
8 # define __swizzle_addr_w(addr) (addr ^ 2UL)
9 # define __swizzle_addr_l(addr) (addr)
10 # define ioswabb(a, x) (x)
11 # define ioswabw(a, x) (x)
12 # define ioswabl(a, x) (x)
13 # define __mem_ioswabb(a, x) (x)
14 # define __mem_ioswabw(a, x) swab16(x)
15 # define __mem_ioswabl(a, x) swab32(x)
16 #elif defined(CONFIG_AP700X_16_BIT_SMC)
17 # define __swizzle_addr_b(addr) (addr ^ 1UL)
18 # define __swizzle_addr_w(addr) (addr)
19 # define __swizzle_addr_l(addr) (addr)
20 # define ioswabb(a, x) (x)
21 # define ioswabw(a, x) (x)
22 # define ioswabl(a, x) swahw32(x)
23 # define __mem_ioswabb(a, x) (x)
24 # define __mem_ioswabw(a, x) swab16(x)
25 # define __mem_ioswabl(a, x) swahb32(x)
26 #else
27 # define __swizzle_addr_b(addr) (addr)
28 # define __swizzle_addr_w(addr) (addr)
29 # define __swizzle_addr_l(addr) (addr)
30 # define ioswabb(a, x) (x)
31 # define ioswabw(a, x) swab16(x)
32 # define ioswabl(a, x) swab32(x)
33 # define __mem_ioswabb(a, x) (x)
34 # define __mem_ioswabw(a, x) (x)
35 # define __mem_ioswabl(a, x) (x)
36 #endif
37 
38 #endif /* __ASM_AVR32_ARCH_AT32AP_IO_H */