ar71xx: register UART for the AR933X SoCs
[openwrt.git] / target / linux / ar71xx / files / arch / mips / include / asm / mach-ar71xx / mangle-port.h
1 /*
2 * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
3 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
4 *
5 * This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h
6 * Copyright (C) 2003, 2004 Ralf Baechle
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published
10 * by the Free Software Foundation.
11 */
12
13 #ifndef __ASM_MACH_AR71XX_MANGLE_PORT_H
14 #define __ASM_MACH_AR71XX_MANGLE_PORT_H
15
16 #define __swizzle_addr_b(port) ((port) ^ 3)
17 #define __swizzle_addr_w(port) ((port) ^ 2)
18 #define __swizzle_addr_l(port) (port)
19 #define __swizzle_addr_q(port) (port)
20
21 #if defined(CONFIG_SWAP_IO_SPACE)
22
23 # define ioswabb(a, x) (x)
24 # define __mem_ioswabb(a, x) (x)
25 # define ioswabw(a, x) le16_to_cpu(x)
26 # define __mem_ioswabw(a, x) (x)
27 # define ioswabl(a, x) le32_to_cpu(x)
28 # define __mem_ioswabl(a, x) (x)
29 # define ioswabq(a, x) le64_to_cpu(x)
30 # define __mem_ioswabq(a, x) (x)
31
32 #else
33
34 # define ioswabb(a, x) (x)
35 # define __mem_ioswabb(a, x) (x)
36 # define ioswabw(a, x) (x)
37 # define __mem_ioswabw(a, x) cpu_to_le16(x)
38 # define ioswabl(a, x) (x)
39 # define __mem_ioswabl(a, x) cpu_to_le32(x)
40 # define ioswabq(a, x) (x)
41 # define __mem_ioswabq(a, x) cpu_to_le64(x)
42
43 #endif
44
45 #endif /* __ASM_MACH_AR71XX_MANGLE_PORT_H */
This page took 0.050345 seconds and 5 git commands to generate.