aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxc/include')
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h13
-rw-r--r--arch/arm/plat-mxc/include/mach/mx1.h5
-rw-r--r--arch/arm/plat-mxc/include/mach/mx21.h9
-rw-r--r--arch/arm/plat-mxc/include/mach/mx25.h9
-rw-r--r--arch/arm/plat-mxc/include/mach/mx27.h9
-rw-r--r--arch/arm/plat-mxc/include/mach/mx31.h13
-rw-r--r--arch/arm/plat-mxc/include/mach/mx35.h13
-rw-r--r--arch/arm/plat-mxc/include/mach/mx51.h13
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc91231.h19
9 files changed, 58 insertions, 45 deletions
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index ebadf4ac43fc..4bbe50612d14 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -22,10 +22,15 @@
22 22
23#include <asm/sizes.h> 23#include <asm/sizes.h>
24 24
25#define IMX_IO_ADDRESS(addr, module) \ 25#ifdef __ASSEMBLER__
26 ((void __force __iomem *) \ 26#define IOMEM(addr) (addr)
27 (((unsigned long)((addr) - (module ## _BASE_ADDR)) < module ## _SIZE) ?\ 27#else
28 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)) 28#define IOMEM(addr) ((void __force __iomem *)(addr))
29#endif
30
31#define IMX_IO_P2V_MODULE(addr, module) \
32 (((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \
33 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
29 34
30#ifdef CONFIG_ARCH_MX5 35#ifdef CONFIG_ARCH_MX5
31#include <mach/mx51.h> 36#include <mach/mx51.h>
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h
index 641b24618239..b41c2887f65c 100644
--- a/arch/arm/plat-mxc/include/mach/mx1.h
+++ b/arch/arm/plat-mxc/include/mach/mx1.h
@@ -73,8 +73,9 @@
73#define MX1_CSI_BASE_ADDR (0x24000 + MX1_IO_BASE_ADDR) 73#define MX1_CSI_BASE_ADDR (0x24000 + MX1_IO_BASE_ADDR)
74 74
75/* macro to get at IO space when running virtually */ 75/* macro to get at IO space when running virtually */
76#define MX1_IO_ADDRESS(x) ( \ 76#define MX1_IO_P2V(x) ( \
77 IMX_IO_ADDRESS(x, MX1_IO)) 77 IMX_IO_P2V_MODULE(x, MX1_IO))
78#define MX1_IO_ADDRESS(x) IOMEM(MX1_IO_P2V(x))
78 79
79/* fixed interrput numbers */ 80/* fixed interrput numbers */
80#define MX1_INT_SOFTINT 0 81#define MX1_INT_SOFTINT 0
diff --git a/arch/arm/plat-mxc/include/mach/mx21.h b/arch/arm/plat-mxc/include/mach/mx21.h
index 8bc59720b6e4..aed0277ebc93 100644
--- a/arch/arm/plat-mxc/include/mach/mx21.h
+++ b/arch/arm/plat-mxc/include/mach/mx21.h
@@ -92,10 +92,11 @@
92 92
93#define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */ 93#define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */
94 94
95#define MX21_IO_ADDRESS(x) ( \ 95#define MX21_IO_P2V(x) ( \
96 IMX_IO_ADDRESS(x, MX21_AIPI) ?: \ 96 IMX_IO_P2V_MODULE(x, MX21_AIPI) ?: \
97 IMX_IO_ADDRESS(x, MX21_SAHB1) ?: \ 97 IMX_IO_P2V_MODULE(x, MX21_SAHB1) ?: \
98 IMX_IO_ADDRESS(x, MX21_X_MEMC)) 98 IMX_IO_P2V_MODULE(x, MX21_X_MEMC))
99#define MX21_IO_ADDRESS(x) IOMEM(MX21_IO_P2V(x))
99 100
100/* fixed interrupt numbers */ 101/* fixed interrupt numbers */
101#define MX21_INT_CSPI3 6 102#define MX21_INT_CSPI3 6
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h
index cf46a45b0d4e..6f9e1d401ce8 100644
--- a/arch/arm/plat-mxc/include/mach/mx25.h
+++ b/arch/arm/plat-mxc/include/mach/mx25.h
@@ -28,10 +28,11 @@
28#define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000) 28#define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000)
29#define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000) 29#define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000)
30 30
31#define MX25_IO_ADDRESS(x) ( \ 31#define MX25_IO_P2V(x) ( \
32 IMX_IO_ADDRESS(x, MX25_AIPS1) ?: \ 32 IMX_IO_P2V_MODULE(x, MX25_AIPS1) ?: \
33 IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \ 33 IMX_IO_P2V_MODULE(x, MX25_AIPS2) ?: \
34 IMX_IO_ADDRESS(x, MX25_AVIC)) 34 IMX_IO_P2V_MODULE(x, MX25_AVIC))
35#define MX25_IO_ADDRESS(x) IOMEM(MX25_IO_P2V(x))
35 36
36#define MX25_AIPS1_IO_ADDRESS(x) \ 37#define MX25_AIPS1_IO_ADDRESS(x) \
37 (((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT) 38 (((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT)
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h
index 2237ba2e5351..c769cc8c0e86 100644
--- a/arch/arm/plat-mxc/include/mach/mx27.h
+++ b/arch/arm/plat-mxc/include/mach/mx27.h
@@ -123,10 +123,11 @@
123/* IRAM */ 123/* IRAM */
124#define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */ 124#define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */
125 125
126#define MX27_IO_ADDRESS(x) ( \ 126#define MX27_IO_P2V(x) ( \
127 IMX_IO_ADDRESS(x, MX27_AIPI) ?: \ 127 IMX_IO_P2V_MODULE(x, MX27_AIPI) ?: \
128 IMX_IO_ADDRESS(x, MX27_SAHB1) ?: \ 128 IMX_IO_P2V_MODULE(x, MX27_SAHB1) ?: \
129 IMX_IO_ADDRESS(x, MX27_X_MEMC)) 129 IMX_IO_P2V_MODULE(x, MX27_X_MEMC))
130#define MX27_IO_ADDRESS(x) IOMEM(MX27_IO_P2V(x))
130 131
131#ifndef __ASSEMBLER__ 132#ifndef __ASSEMBLER__
132static inline void mx27_setup_weimcs(size_t cs, 133static inline void mx27_setup_weimcs(size_t cs,
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h
index 61cfe827498b..eb4a28dc2686 100644
--- a/arch/arm/plat-mxc/include/mach/mx31.h
+++ b/arch/arm/plat-mxc/include/mach/mx31.h
@@ -121,12 +121,13 @@
121 121
122#define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000 122#define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000
123 123
124#define MX31_IO_ADDRESS(x) ( \ 124#define MX31_IO_P2V(x) ( \
125 IMX_IO_ADDRESS(x, MX31_AIPS1) ?: \ 125 IMX_IO_P2V_MODULE(x, MX31_AIPS1) ?: \
126 IMX_IO_ADDRESS(x, MX31_AIPS2) ?: \ 126 IMX_IO_P2V_MODULE(x, MX31_AIPS2) ?: \
127 IMX_IO_ADDRESS(x, MX31_AVIC) ?: \ 127 IMX_IO_P2V_MODULE(x, MX31_AVIC) ?: \
128 IMX_IO_ADDRESS(x, MX31_X_MEMC) ?: \ 128 IMX_IO_P2V_MODULE(x, MX31_X_MEMC) ?: \
129 IMX_IO_ADDRESS(x, MX31_SPBA0)) 129 IMX_IO_P2V_MODULE(x, MX31_SPBA0))
130#define MX31_IO_ADDRESS(x) IOMEM(MX31_IO_P2V(x))
130 131
131#ifndef __ASSEMBLER__ 132#ifndef __ASSEMBLER__
132static inline void mx31_setup_weimcs(size_t cs, 133static inline void mx31_setup_weimcs(size_t cs,
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h
index 6267cff6035d..ce1a24b09337 100644
--- a/arch/arm/plat-mxc/include/mach/mx35.h
+++ b/arch/arm/plat-mxc/include/mach/mx35.h
@@ -114,12 +114,13 @@
114#define MX35_NFC_BASE_ADDR 0xbb000000 114#define MX35_NFC_BASE_ADDR 0xbb000000
115#define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000 115#define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000
116 116
117#define MX35_IO_ADDRESS(x) ( \ 117#define MX35_IO_P2V(x) ( \
118 IMX_IO_ADDRESS(x, MX35_AIPS1) ?: \ 118 IMX_IO_P2V_MODULE(x, MX35_AIPS1) ?: \
119 IMX_IO_ADDRESS(x, MX35_AIPS2) ?: \ 119 IMX_IO_P2V_MODULE(x, MX35_AIPS2) ?: \
120 IMX_IO_ADDRESS(x, MX35_AVIC) ?: \ 120 IMX_IO_P2V_MODULE(x, MX35_AVIC) ?: \
121 IMX_IO_ADDRESS(x, MX35_X_MEMC) ?: \ 121 IMX_IO_P2V_MODULE(x, MX35_X_MEMC) ?: \
122 IMX_IO_ADDRESS(x, MX35_SPBA0)) 122 IMX_IO_P2V_MODULE(x, MX35_SPBA0))
123#define MX35_IO_ADDRESS(x) IOMEM(MX35_IO_P2V(x))
123 124
124/* 125/*
125 * Interrupt numbers 126 * Interrupt numbers
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index 2af7a1056fc1..e93cf5be90a4 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -163,12 +163,13 @@
163#define MX51_GPU2D_BASE_ADDR 0xd0000000 163#define MX51_GPU2D_BASE_ADDR 0xd0000000
164#define MX51_TZIC_BASE_ADDR 0xe0000000 164#define MX51_TZIC_BASE_ADDR 0xe0000000
165 165
166#define MX51_IO_ADDRESS(x) ( \ 166#define MX51_IO_P2V(x) ( \
167 IMX_IO_ADDRESS(x, MX51_IRAM) ?: \ 167 IMX_IO_P2V_MODULE(x, MX51_IRAM) ?: \
168 IMX_IO_ADDRESS(x, MX51_DEBUG) ?: \ 168 IMX_IO_P2V_MODULE(x, MX51_DEBUG) ?: \
169 IMX_IO_ADDRESS(x, MX51_SPBA0) ?: \ 169 IMX_IO_P2V_MODULE(x, MX51_SPBA0) ?: \
170 IMX_IO_ADDRESS(x, MX51_AIPS1) ?: \ 170 IMX_IO_P2V_MODULE(x, MX51_AIPS1) ?: \
171 IMX_IO_ADDRESS(x, MX51_AIPS2)) 171 IMX_IO_P2V_MODULE(x, MX51_AIPS2))
172#define MX51_IO_ADDRESS(x) IOMEM(MX51_IO_P2V(x))
172 173
173/* This is currently used in <mach/debug-macro.S>, but should go away */ 174/* This is currently used in <mach/debug-macro.S>, but should go away */
174#define MX51_AIPS1_IO_ADDRESS(x) \ 175#define MX51_AIPS1_IO_ADDRESS(x) \
diff --git a/arch/arm/plat-mxc/include/mach/mxc91231.h b/arch/arm/plat-mxc/include/mach/mxc91231.h
index 0ca3101ebf36..49e5e25000fc 100644
--- a/arch/arm/plat-mxc/include/mach/mxc91231.h
+++ b/arch/arm/plat-mxc/include/mach/mxc91231.h
@@ -187,15 +187,16 @@
187 * it returns 0. 187 * it returns 0.
188 */ 188 */
189 189
190#define MXC91231_IO_ADDRESS(x) ( \ 190#define MXC91231_IO_P2V(x) ( \
191 IMX_IO_ADDRESS(x, MXC91231_L2CC) ?: \ 191 IMX_IO_P2V_MODULE(x, MXC91231_L2CC) ?: \
192 IMX_IO_ADDRESS(x, MXC91231_X_MEMC) ?: \ 192 IMX_IO_P2V_MODULE(x, MXC91231_X_MEMC) ?: \
193 IMX_IO_ADDRESS(x, MXC91231_ROMP) ?: \ 193 IMX_IO_P2V_MODULE(x, MXC91231_ROMP) ?: \
194 IMX_IO_ADDRESS(x, MXC91231_AVIC) ?: \ 194 IMX_IO_P2V_MODULE(x, MXC91231_AVIC) ?: \
195 IMX_IO_ADDRESS(x, MXC91231_AIPS1) ?: \ 195 IMX_IO_P2V_MODULE(x, MXC91231_AIPS1) ?: \
196 IMX_IO_ADDRESS(x, MXC91231_SPBA0) ?: \ 196 IMX_IO_P2V_MODULE(x, MXC91231_SPBA0) ?: \
197 IMX_IO_ADDRESS(x, MXC91231_SPBA1) ?: \ 197 IMX_IO_P2V_MODULE(x, MXC91231_SPBA1) ?: \
198 IMX_IO_ADDRESS(x, MXC91231_AIPS2)) 198 IMX_IO_P2V_MODULE(x, MXC91231_AIPS2))
199#define MXC91231_IO_ADDRESS(x) IOMEM(MXC91231_IO_P2V(x))
199 200
200/* 201/*
201 * Interrupt numbers 202 * Interrupt numbers