xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/mach-ip27/mangle-port.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
3*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
4*4882a593Smuzhiyun  * for more details.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Copyright (C) 2003, 2004 Ralf Baechle
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun #ifndef __ASM_MACH_IP27_MANGLE_PORT_H
9*4882a593Smuzhiyun #define __ASM_MACH_IP27_MANGLE_PORT_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #define __swizzle_addr_b(port)	((port) ^ 3)
12*4882a593Smuzhiyun #define __swizzle_addr_w(port)	((port) ^ 2)
13*4882a593Smuzhiyun #define __swizzle_addr_l(port)	(port)
14*4882a593Smuzhiyun #define __swizzle_addr_q(port)	(port)
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun # define ioswabb(a, x)		(x)
17*4882a593Smuzhiyun # define __mem_ioswabb(a, x)	(x)
18*4882a593Smuzhiyun # define ioswabw(a, x)		(x)
19*4882a593Smuzhiyun # define __mem_ioswabw(a, x)	((__force u16)cpu_to_le16(x))
20*4882a593Smuzhiyun # define ioswabl(a, x)		(x)
21*4882a593Smuzhiyun # define __mem_ioswabl(a, x)	((__force u32)cpu_to_le32(x))
22*4882a593Smuzhiyun # define ioswabq(a, x)		(x)
23*4882a593Smuzhiyun # define __mem_ioswabq(a, x)	((__force u64)cpu_to_le64(x))
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #endif /* __ASM_MACH_IP27_MANGLE_PORT_H */
26