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 Ladislav Michl 7*4882a593Smuzhiyun * Copyright (C) 2004 Ralf Baechle 8*4882a593Smuzhiyun */ 9*4882a593Smuzhiyun #ifndef __ASM_MACH_IP32_MANGLE_PORT_H 10*4882a593Smuzhiyun #define __ASM_MACH_IP32_MANGLE_PORT_H 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun #define __swizzle_addr_b(port) ((port) ^ 3) 13*4882a593Smuzhiyun #define __swizzle_addr_w(port) ((port) ^ 2) 14*4882a593Smuzhiyun #define __swizzle_addr_l(port) (port) 15*4882a593Smuzhiyun #define __swizzle_addr_q(port) (port) 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun # define ioswabb(a, x) (x) 18*4882a593Smuzhiyun # define __mem_ioswabb(a, x) (x) 19*4882a593Smuzhiyun # define ioswabw(a, x) (x) 20*4882a593Smuzhiyun # define __mem_ioswabw(a, x) ((__force u16)cpu_to_le16(x)) 21*4882a593Smuzhiyun # define ioswabl(a, x) (x) 22*4882a593Smuzhiyun # define __mem_ioswabl(a, x) ((__force u32)cpu_to_le32(x)) 23*4882a593Smuzhiyun # define ioswabq(a, x) (x) 24*4882a593Smuzhiyun # define __mem_ioswabq(a, x) ((__force u64)cpu_to_le64(x)) 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #endif /* __ASM_MACH_IP32_MANGLE_PORT_H */ 27