PageRenderTime 26ms CodeModel.GetById 23ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/avr32/mach-at32ap/include/mach/io.h

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
C++ Header | 38 lines | 35 code | 3 blank | 0 comment | 0 complexity | ada9f8a12b861528673c0a3c03b410a6 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 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 */