diff options
Diffstat (limited to 'arch')
-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 854e2dc58481..7a8982dfd926 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 |