diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-12-16 13:07:04 -0500 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-01-08 10:41:27 -0500 |
commit | df9375fad4f99b28f5a500d9aa2cbb04e065ac97 (patch) | |
tree | 0a6c1cdbe044baa1c52886101d584a9c46d05928 /arch/arm/plat-mxc | |
parent | 1273e7686f0c122bf58592c57387471c7f4eaa1b (diff) |
imx25: redefine MX25_IO_ADDRESS using IMX_IO_ADDRESS
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx25.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 854e2dc5848..7a8982dfd92 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -22,21 +22,10 @@ | |||
22 | #define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000) | 22 | #define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000) |
23 | #define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000) | 23 | #define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000) |
24 | 24 | ||
25 | #define MX25_AIPS1_IO_ADDRESS(x) \ | 25 | #define MX25_IO_ADDRESS(x) ( \ |
26 | (((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT) | 26 | IMX_IO_ADDRESS(x, MX25_AIPS1) ?: \ |
27 | #define MX25_AIPS2_IO_ADDRESS(x) \ | 27 | IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \ |
28 | (((x) - MX25_AIPS2_BASE_ADDR) + MX25_AIPS2_BASE_ADDR_VIRT) | 28 | IMX_IO_ADDRESS(x, MX25_AVIC)) |
29 | #define MX25_AVIC_IO_ADDRESS(x) \ | ||
30 | (((x) - MX25_AVIC_BASE_ADDR) + MX25_AVIC_BASE_ADDR_VIRT) | ||
31 | |||
32 | #define __in_range(addr, name) ((addr) >= name##_BASE_ADDR && (addr) < name##_BASE_ADDR + name##_SIZE) | ||
33 | |||
34 | #define MX25_IO_ADDRESS(x) \ | ||
35 | (void __force __iomem *) \ | ||
36 | (__in_range(x, MX25_AIPS1) ? MX25_AIPS1_IO_ADDRESS(x) : \ | ||
37 | __in_range(x, MX25_AIPS2) ? MX25_AIPS2_IO_ADDRESS(x) : \ | ||
38 | __in_range(x, MX25_AVIC) ? MX25_AVIC_IO_ADDRESS(x) : \ | ||
39 | 0xDEADBEEF) | ||
40 | 29 | ||
41 | #define UART1_BASE_ADDR 0x43f90000 | 30 | #define UART1_BASE_ADDR 0x43f90000 |
42 | #define UART2_BASE_ADDR 0x43f94000 | 31 | #define UART2_BASE_ADDR 0x43f94000 |