diff options
author | David Brown <davidb@codeaurora.org> | 2011-06-06 17:09:45 -0400 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2011-08-01 07:58:00 -0400 |
commit | 9def3efc4856597bc6bb9611f444defc898d2e0d (patch) | |
tree | 996e24c1f05c3210a2ccfea16e33cc32232ee1af /arch | |
parent | 030a77fc9b805a38a2ffaea42728557282b81275 (diff) |
msm: gpio: Fold register defs into C file
No need to have a separate header file containing only register
definitions that are used by a single driver. Fold these into the
gpio driver.
Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-msm/gpio.c | 251 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpio_hw.h | 272 |
2 files changed, 250 insertions, 273 deletions
diff --git a/arch/arm/mach-msm/gpio.c b/arch/arm/mach-msm/gpio.c index 6767deb79cd0..3bbf50ed2b42 100644 --- a/arch/arm/mach-msm/gpio.c +++ b/arch/arm/mach-msm/gpio.c | |||
@@ -22,7 +22,256 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <mach/cpu.h> | 23 | #include <mach/cpu.h> |
24 | #include <mach/msm_gpiomux.h> | 24 | #include <mach/msm_gpiomux.h> |
25 | #include "gpio_hw.h" | 25 | #include <mach/msm_iomap.h> |
26 | |||
27 | /* see 80-VA736-2 Rev C pp 695-751 | ||
28 | ** | ||
29 | ** These are actually the *shadow* gpio registers, since the | ||
30 | ** real ones (which allow full access) are only available to the | ||
31 | ** ARM9 side of the world. | ||
32 | ** | ||
33 | ** Since the _BASE need to be page-aligned when we're mapping them | ||
34 | ** to virtual addresses, adjust for the additional offset in these | ||
35 | ** macros. | ||
36 | */ | ||
37 | |||
38 | #define MSM_GPIO1_REG(off) (MSM_GPIO1_BASE + (off)) | ||
39 | #define MSM_GPIO2_REG(off) (MSM_GPIO2_BASE + 0x400 + (off)) | ||
40 | #define MSM_GPIO1_SHADOW_REG(off) (MSM_GPIO1_BASE + 0x800 + (off)) | ||
41 | #define MSM_GPIO2_SHADOW_REG(off) (MSM_GPIO2_BASE + 0xC00 + (off)) | ||
42 | |||
43 | /* | ||
44 | * MSM7X00 registers | ||
45 | */ | ||
46 | /* output value */ | ||
47 | #define MSM7X00_GPIO_OUT_0 MSM_GPIO1_SHADOW_REG(0x00) /* gpio 15-0 */ | ||
48 | #define MSM7X00_GPIO_OUT_1 MSM_GPIO2_SHADOW_REG(0x00) /* gpio 42-16 */ | ||
49 | #define MSM7X00_GPIO_OUT_2 MSM_GPIO1_SHADOW_REG(0x04) /* gpio 67-43 */ | ||
50 | #define MSM7X00_GPIO_OUT_3 MSM_GPIO1_SHADOW_REG(0x08) /* gpio 94-68 */ | ||
51 | #define MSM7X00_GPIO_OUT_4 MSM_GPIO1_SHADOW_REG(0x0C) /* gpio 106-95 */ | ||
52 | #define MSM7X00_GPIO_OUT_5 MSM_GPIO1_SHADOW_REG(0x50) /* gpio 107-121 */ | ||
53 | |||
54 | /* same pin map as above, output enable */ | ||
55 | #define MSM7X00_GPIO_OE_0 MSM_GPIO1_SHADOW_REG(0x10) | ||
56 | #define MSM7X00_GPIO_OE_1 MSM_GPIO2_SHADOW_REG(0x08) | ||
57 | #define MSM7X00_GPIO_OE_2 MSM_GPIO1_SHADOW_REG(0x14) | ||
58 | #define MSM7X00_GPIO_OE_3 MSM_GPIO1_SHADOW_REG(0x18) | ||
59 | #define MSM7X00_GPIO_OE_4 MSM_GPIO1_SHADOW_REG(0x1C) | ||
60 | #define MSM7X00_GPIO_OE_5 MSM_GPIO1_SHADOW_REG(0x54) | ||
61 | |||
62 | /* same pin map as above, input read */ | ||
63 | #define MSM7X00_GPIO_IN_0 MSM_GPIO1_SHADOW_REG(0x34) | ||
64 | #define MSM7X00_GPIO_IN_1 MSM_GPIO2_SHADOW_REG(0x20) | ||
65 | #define MSM7X00_GPIO_IN_2 MSM_GPIO1_SHADOW_REG(0x38) | ||
66 | #define MSM7X00_GPIO_IN_3 MSM_GPIO1_SHADOW_REG(0x3C) | ||
67 | #define MSM7X00_GPIO_IN_4 MSM_GPIO1_SHADOW_REG(0x40) | ||
68 | #define MSM7X00_GPIO_IN_5 MSM_GPIO1_SHADOW_REG(0x44) | ||
69 | |||
70 | /* same pin map as above, 1=edge 0=level interrup */ | ||
71 | #define MSM7X00_GPIO_INT_EDGE_0 MSM_GPIO1_SHADOW_REG(0x60) | ||
72 | #define MSM7X00_GPIO_INT_EDGE_1 MSM_GPIO2_SHADOW_REG(0x50) | ||
73 | #define MSM7X00_GPIO_INT_EDGE_2 MSM_GPIO1_SHADOW_REG(0x64) | ||
74 | #define MSM7X00_GPIO_INT_EDGE_3 MSM_GPIO1_SHADOW_REG(0x68) | ||
75 | #define MSM7X00_GPIO_INT_EDGE_4 MSM_GPIO1_SHADOW_REG(0x6C) | ||
76 | #define MSM7X00_GPIO_INT_EDGE_5 MSM_GPIO1_SHADOW_REG(0xC0) | ||
77 | |||
78 | /* same pin map as above, 1=positive 0=negative */ | ||
79 | #define MSM7X00_GPIO_INT_POS_0 MSM_GPIO1_SHADOW_REG(0x70) | ||
80 | #define MSM7X00_GPIO_INT_POS_1 MSM_GPIO2_SHADOW_REG(0x58) | ||
81 | #define MSM7X00_GPIO_INT_POS_2 MSM_GPIO1_SHADOW_REG(0x74) | ||
82 | #define MSM7X00_GPIO_INT_POS_3 MSM_GPIO1_SHADOW_REG(0x78) | ||
83 | #define MSM7X00_GPIO_INT_POS_4 MSM_GPIO1_SHADOW_REG(0x7C) | ||
84 | #define MSM7X00_GPIO_INT_POS_5 MSM_GPIO1_SHADOW_REG(0xBC) | ||
85 | |||
86 | /* same pin map as above, interrupt enable */ | ||
87 | #define MSM7X00_GPIO_INT_EN_0 MSM_GPIO1_SHADOW_REG(0x80) | ||
88 | #define MSM7X00_GPIO_INT_EN_1 MSM_GPIO2_SHADOW_REG(0x60) | ||
89 | #define MSM7X00_GPIO_INT_EN_2 MSM_GPIO1_SHADOW_REG(0x84) | ||
90 | #define MSM7X00_GPIO_INT_EN_3 MSM_GPIO1_SHADOW_REG(0x88) | ||
91 | #define MSM7X00_GPIO_INT_EN_4 MSM_GPIO1_SHADOW_REG(0x8C) | ||
92 | #define MSM7X00_GPIO_INT_EN_5 MSM_GPIO1_SHADOW_REG(0xB8) | ||
93 | |||
94 | /* same pin map as above, write 1 to clear interrupt */ | ||
95 | #define MSM7X00_GPIO_INT_CLEAR_0 MSM_GPIO1_SHADOW_REG(0x90) | ||
96 | #define MSM7X00_GPIO_INT_CLEAR_1 MSM_GPIO2_SHADOW_REG(0x68) | ||
97 | #define MSM7X00_GPIO_INT_CLEAR_2 MSM_GPIO1_SHADOW_REG(0x94) | ||
98 | #define MSM7X00_GPIO_INT_CLEAR_3 MSM_GPIO1_SHADOW_REG(0x98) | ||
99 | #define MSM7X00_GPIO_INT_CLEAR_4 MSM_GPIO1_SHADOW_REG(0x9C) | ||
100 | #define MSM7X00_GPIO_INT_CLEAR_5 MSM_GPIO1_SHADOW_REG(0xB4) | ||
101 | |||
102 | /* same pin map as above, 1=interrupt pending */ | ||
103 | #define MSM7X00_GPIO_INT_STATUS_0 MSM_GPIO1_SHADOW_REG(0xA0) | ||
104 | #define MSM7X00_GPIO_INT_STATUS_1 MSM_GPIO2_SHADOW_REG(0x70) | ||
105 | #define MSM7X00_GPIO_INT_STATUS_2 MSM_GPIO1_SHADOW_REG(0xA4) | ||
106 | #define MSM7X00_GPIO_INT_STATUS_3 MSM_GPIO1_SHADOW_REG(0xA8) | ||
107 | #define MSM7X00_GPIO_INT_STATUS_4 MSM_GPIO1_SHADOW_REG(0xAC) | ||
108 | #define MSM7X00_GPIO_INT_STATUS_5 MSM_GPIO1_SHADOW_REG(0xB0) | ||
109 | |||
110 | /* | ||
111 | * QSD8X50 registers | ||
112 | */ | ||
113 | /* output value */ | ||
114 | #define QSD8X50_GPIO_OUT_0 MSM_GPIO1_SHADOW_REG(0x00) /* gpio 15-0 */ | ||
115 | #define QSD8X50_GPIO_OUT_1 MSM_GPIO2_SHADOW_REG(0x00) /* gpio 42-16 */ | ||
116 | #define QSD8X50_GPIO_OUT_2 MSM_GPIO1_SHADOW_REG(0x04) /* gpio 67-43 */ | ||
117 | #define QSD8X50_GPIO_OUT_3 MSM_GPIO1_SHADOW_REG(0x08) /* gpio 94-68 */ | ||
118 | #define QSD8X50_GPIO_OUT_4 MSM_GPIO1_SHADOW_REG(0x0C) /* gpio 103-95 */ | ||
119 | #define QSD8X50_GPIO_OUT_5 MSM_GPIO1_SHADOW_REG(0x10) /* gpio 121-104 */ | ||
120 | #define QSD8X50_GPIO_OUT_6 MSM_GPIO1_SHADOW_REG(0x14) /* gpio 152-122 */ | ||
121 | #define QSD8X50_GPIO_OUT_7 MSM_GPIO1_SHADOW_REG(0x18) /* gpio 164-153 */ | ||
122 | |||
123 | /* same pin map as above, output enable */ | ||
124 | #define QSD8X50_GPIO_OE_0 MSM_GPIO1_SHADOW_REG(0x20) | ||
125 | #define QSD8X50_GPIO_OE_1 MSM_GPIO2_SHADOW_REG(0x08) | ||
126 | #define QSD8X50_GPIO_OE_2 MSM_GPIO1_SHADOW_REG(0x24) | ||
127 | #define QSD8X50_GPIO_OE_3 MSM_GPIO1_SHADOW_REG(0x28) | ||
128 | #define QSD8X50_GPIO_OE_4 MSM_GPIO1_SHADOW_REG(0x2C) | ||
129 | #define QSD8X50_GPIO_OE_5 MSM_GPIO1_SHADOW_REG(0x30) | ||
130 | #define QSD8X50_GPIO_OE_6 MSM_GPIO1_SHADOW_REG(0x34) | ||
131 | #define QSD8X50_GPIO_OE_7 MSM_GPIO1_SHADOW_REG(0x38) | ||
132 | |||
133 | /* same pin map as above, input read */ | ||
134 | #define QSD8X50_GPIO_IN_0 MSM_GPIO1_SHADOW_REG(0x50) | ||
135 | #define QSD8X50_GPIO_IN_1 MSM_GPIO2_SHADOW_REG(0x20) | ||
136 | #define QSD8X50_GPIO_IN_2 MSM_GPIO1_SHADOW_REG(0x54) | ||
137 | #define QSD8X50_GPIO_IN_3 MSM_GPIO1_SHADOW_REG(0x58) | ||
138 | #define QSD8X50_GPIO_IN_4 MSM_GPIO1_SHADOW_REG(0x5C) | ||
139 | #define QSD8X50_GPIO_IN_5 MSM_GPIO1_SHADOW_REG(0x60) | ||
140 | #define QSD8X50_GPIO_IN_6 MSM_GPIO1_SHADOW_REG(0x64) | ||
141 | #define QSD8X50_GPIO_IN_7 MSM_GPIO1_SHADOW_REG(0x68) | ||
142 | |||
143 | /* same pin map as above, 1=edge 0=level interrup */ | ||
144 | #define QSD8X50_GPIO_INT_EDGE_0 MSM_GPIO1_SHADOW_REG(0x70) | ||
145 | #define QSD8X50_GPIO_INT_EDGE_1 MSM_GPIO2_SHADOW_REG(0x50) | ||
146 | #define QSD8X50_GPIO_INT_EDGE_2 MSM_GPIO1_SHADOW_REG(0x74) | ||
147 | #define QSD8X50_GPIO_INT_EDGE_3 MSM_GPIO1_SHADOW_REG(0x78) | ||
148 | #define QSD8X50_GPIO_INT_EDGE_4 MSM_GPIO1_SHADOW_REG(0x7C) | ||
149 | #define QSD8X50_GPIO_INT_EDGE_5 MSM_GPIO1_SHADOW_REG(0x80) | ||
150 | #define QSD8X50_GPIO_INT_EDGE_6 MSM_GPIO1_SHADOW_REG(0x84) | ||
151 | #define QSD8X50_GPIO_INT_EDGE_7 MSM_GPIO1_SHADOW_REG(0x88) | ||
152 | |||
153 | /* same pin map as above, 1=positive 0=negative */ | ||
154 | #define QSD8X50_GPIO_INT_POS_0 MSM_GPIO1_SHADOW_REG(0x90) | ||
155 | #define QSD8X50_GPIO_INT_POS_1 MSM_GPIO2_SHADOW_REG(0x58) | ||
156 | #define QSD8X50_GPIO_INT_POS_2 MSM_GPIO1_SHADOW_REG(0x94) | ||
157 | #define QSD8X50_GPIO_INT_POS_3 MSM_GPIO1_SHADOW_REG(0x98) | ||
158 | #define QSD8X50_GPIO_INT_POS_4 MSM_GPIO1_SHADOW_REG(0x9C) | ||
159 | #define QSD8X50_GPIO_INT_POS_5 MSM_GPIO1_SHADOW_REG(0xA0) | ||
160 | #define QSD8X50_GPIO_INT_POS_6 MSM_GPIO1_SHADOW_REG(0xA4) | ||
161 | #define QSD8X50_GPIO_INT_POS_7 MSM_GPIO1_SHADOW_REG(0xA8) | ||
162 | |||
163 | /* same pin map as above, interrupt enable */ | ||
164 | #define QSD8X50_GPIO_INT_EN_0 MSM_GPIO1_SHADOW_REG(0xB0) | ||
165 | #define QSD8X50_GPIO_INT_EN_1 MSM_GPIO2_SHADOW_REG(0x60) | ||
166 | #define QSD8X50_GPIO_INT_EN_2 MSM_GPIO1_SHADOW_REG(0xB4) | ||
167 | #define QSD8X50_GPIO_INT_EN_3 MSM_GPIO1_SHADOW_REG(0xB8) | ||
168 | #define QSD8X50_GPIO_INT_EN_4 MSM_GPIO1_SHADOW_REG(0xBC) | ||
169 | #define QSD8X50_GPIO_INT_EN_5 MSM_GPIO1_SHADOW_REG(0xC0) | ||
170 | #define QSD8X50_GPIO_INT_EN_6 MSM_GPIO1_SHADOW_REG(0xC4) | ||
171 | #define QSD8X50_GPIO_INT_EN_7 MSM_GPIO1_SHADOW_REG(0xC8) | ||
172 | |||
173 | /* same pin map as above, write 1 to clear interrupt */ | ||
174 | #define QSD8X50_GPIO_INT_CLEAR_0 MSM_GPIO1_SHADOW_REG(0xD0) | ||
175 | #define QSD8X50_GPIO_INT_CLEAR_1 MSM_GPIO2_SHADOW_REG(0x68) | ||
176 | #define QSD8X50_GPIO_INT_CLEAR_2 MSM_GPIO1_SHADOW_REG(0xD4) | ||
177 | #define QSD8X50_GPIO_INT_CLEAR_3 MSM_GPIO1_SHADOW_REG(0xD8) | ||
178 | #define QSD8X50_GPIO_INT_CLEAR_4 MSM_GPIO1_SHADOW_REG(0xDC) | ||
179 | #define QSD8X50_GPIO_INT_CLEAR_5 MSM_GPIO1_SHADOW_REG(0xE0) | ||
180 | #define QSD8X50_GPIO_INT_CLEAR_6 MSM_GPIO1_SHADOW_REG(0xE4) | ||
181 | #define QSD8X50_GPIO_INT_CLEAR_7 MSM_GPIO1_SHADOW_REG(0xE8) | ||
182 | |||
183 | /* same pin map as above, 1=interrupt pending */ | ||
184 | #define QSD8X50_GPIO_INT_STATUS_0 MSM_GPIO1_SHADOW_REG(0xF0) | ||
185 | #define QSD8X50_GPIO_INT_STATUS_1 MSM_GPIO2_SHADOW_REG(0x70) | ||
186 | #define QSD8X50_GPIO_INT_STATUS_2 MSM_GPIO1_SHADOW_REG(0xF4) | ||
187 | #define QSD8X50_GPIO_INT_STATUS_3 MSM_GPIO1_SHADOW_REG(0xF8) | ||
188 | #define QSD8X50_GPIO_INT_STATUS_4 MSM_GPIO1_SHADOW_REG(0xFC) | ||
189 | #define QSD8X50_GPIO_INT_STATUS_5 MSM_GPIO1_SHADOW_REG(0x100) | ||
190 | #define QSD8X50_GPIO_INT_STATUS_6 MSM_GPIO1_SHADOW_REG(0x104) | ||
191 | #define QSD8X50_GPIO_INT_STATUS_7 MSM_GPIO1_SHADOW_REG(0x108) | ||
192 | |||
193 | /* | ||
194 | * MSM7X30 registers | ||
195 | */ | ||
196 | /* output value */ | ||
197 | #define MSM7X30_GPIO_OUT_0 MSM_GPIO1_REG(0x00) /* gpio 15-0 */ | ||
198 | #define MSM7X30_GPIO_OUT_1 MSM_GPIO2_REG(0x00) /* gpio 43-16 */ | ||
199 | #define MSM7X30_GPIO_OUT_2 MSM_GPIO1_REG(0x04) /* gpio 67-44 */ | ||
200 | #define MSM7X30_GPIO_OUT_3 MSM_GPIO1_REG(0x08) /* gpio 94-68 */ | ||
201 | #define MSM7X30_GPIO_OUT_4 MSM_GPIO1_REG(0x0C) /* gpio 106-95 */ | ||
202 | #define MSM7X30_GPIO_OUT_5 MSM_GPIO1_REG(0x50) /* gpio 133-107 */ | ||
203 | #define MSM7X30_GPIO_OUT_6 MSM_GPIO1_REG(0xC4) /* gpio 150-134 */ | ||
204 | #define MSM7X30_GPIO_OUT_7 MSM_GPIO1_REG(0x214) /* gpio 181-151 */ | ||
205 | |||
206 | /* same pin map as above, output enable */ | ||
207 | #define MSM7X30_GPIO_OE_0 MSM_GPIO1_REG(0x10) | ||
208 | #define MSM7X30_GPIO_OE_1 MSM_GPIO2_REG(0x08) | ||
209 | #define MSM7X30_GPIO_OE_2 MSM_GPIO1_REG(0x14) | ||
210 | #define MSM7X30_GPIO_OE_3 MSM_GPIO1_REG(0x18) | ||
211 | #define MSM7X30_GPIO_OE_4 MSM_GPIO1_REG(0x1C) | ||
212 | #define MSM7X30_GPIO_OE_5 MSM_GPIO1_REG(0x54) | ||
213 | #define MSM7X30_GPIO_OE_6 MSM_GPIO1_REG(0xC8) | ||
214 | #define MSM7X30_GPIO_OE_7 MSM_GPIO1_REG(0x218) | ||
215 | |||
216 | /* same pin map as above, input read */ | ||
217 | #define MSM7X30_GPIO_IN_0 MSM_GPIO1_REG(0x34) | ||
218 | #define MSM7X30_GPIO_IN_1 MSM_GPIO2_REG(0x20) | ||
219 | #define MSM7X30_GPIO_IN_2 MSM_GPIO1_REG(0x38) | ||
220 | #define MSM7X30_GPIO_IN_3 MSM_GPIO1_REG(0x3C) | ||
221 | #define MSM7X30_GPIO_IN_4 MSM_GPIO1_REG(0x40) | ||
222 | #define MSM7X30_GPIO_IN_5 MSM_GPIO1_REG(0x44) | ||
223 | #define MSM7X30_GPIO_IN_6 MSM_GPIO1_REG(0xCC) | ||
224 | #define MSM7X30_GPIO_IN_7 MSM_GPIO1_REG(0x21C) | ||
225 | |||
226 | /* same pin map as above, 1=edge 0=level interrup */ | ||
227 | #define MSM7X30_GPIO_INT_EDGE_0 MSM_GPIO1_REG(0x60) | ||
228 | #define MSM7X30_GPIO_INT_EDGE_1 MSM_GPIO2_REG(0x50) | ||
229 | #define MSM7X30_GPIO_INT_EDGE_2 MSM_GPIO1_REG(0x64) | ||
230 | #define MSM7X30_GPIO_INT_EDGE_3 MSM_GPIO1_REG(0x68) | ||
231 | #define MSM7X30_GPIO_INT_EDGE_4 MSM_GPIO1_REG(0x6C) | ||
232 | #define MSM7X30_GPIO_INT_EDGE_5 MSM_GPIO1_REG(0xC0) | ||
233 | #define MSM7X30_GPIO_INT_EDGE_6 MSM_GPIO1_REG(0xD0) | ||
234 | #define MSM7X30_GPIO_INT_EDGE_7 MSM_GPIO1_REG(0x240) | ||
235 | |||
236 | /* same pin map as above, 1=positive 0=negative */ | ||
237 | #define MSM7X30_GPIO_INT_POS_0 MSM_GPIO1_REG(0x70) | ||
238 | #define MSM7X30_GPIO_INT_POS_1 MSM_GPIO2_REG(0x58) | ||
239 | #define MSM7X30_GPIO_INT_POS_2 MSM_GPIO1_REG(0x74) | ||
240 | #define MSM7X30_GPIO_INT_POS_3 MSM_GPIO1_REG(0x78) | ||
241 | #define MSM7X30_GPIO_INT_POS_4 MSM_GPIO1_REG(0x7C) | ||
242 | #define MSM7X30_GPIO_INT_POS_5 MSM_GPIO1_REG(0xBC) | ||
243 | #define MSM7X30_GPIO_INT_POS_6 MSM_GPIO1_REG(0xD4) | ||
244 | #define MSM7X30_GPIO_INT_POS_7 MSM_GPIO1_REG(0x228) | ||
245 | |||
246 | /* same pin map as above, interrupt enable */ | ||
247 | #define MSM7X30_GPIO_INT_EN_0 MSM_GPIO1_REG(0x80) | ||
248 | #define MSM7X30_GPIO_INT_EN_1 MSM_GPIO2_REG(0x60) | ||
249 | #define MSM7X30_GPIO_INT_EN_2 MSM_GPIO1_REG(0x84) | ||
250 | #define MSM7X30_GPIO_INT_EN_3 MSM_GPIO1_REG(0x88) | ||
251 | #define MSM7X30_GPIO_INT_EN_4 MSM_GPIO1_REG(0x8C) | ||
252 | #define MSM7X30_GPIO_INT_EN_5 MSM_GPIO1_REG(0xB8) | ||
253 | #define MSM7X30_GPIO_INT_EN_6 MSM_GPIO1_REG(0xD8) | ||
254 | #define MSM7X30_GPIO_INT_EN_7 MSM_GPIO1_REG(0x22C) | ||
255 | |||
256 | /* same pin map as above, write 1 to clear interrupt */ | ||
257 | #define MSM7X30_GPIO_INT_CLEAR_0 MSM_GPIO1_REG(0x90) | ||
258 | #define MSM7X30_GPIO_INT_CLEAR_1 MSM_GPIO2_REG(0x68) | ||
259 | #define MSM7X30_GPIO_INT_CLEAR_2 MSM_GPIO1_REG(0x94) | ||
260 | #define MSM7X30_GPIO_INT_CLEAR_3 MSM_GPIO1_REG(0x98) | ||
261 | #define MSM7X30_GPIO_INT_CLEAR_4 MSM_GPIO1_REG(0x9C) | ||
262 | #define MSM7X30_GPIO_INT_CLEAR_5 MSM_GPIO1_REG(0xB4) | ||
263 | #define MSM7X30_GPIO_INT_CLEAR_6 MSM_GPIO1_REG(0xDC) | ||
264 | #define MSM7X30_GPIO_INT_CLEAR_7 MSM_GPIO1_REG(0x230) | ||
265 | |||
266 | /* same pin map as above, 1=interrupt pending */ | ||
267 | #define MSM7X30_GPIO_INT_STATUS_0 MSM_GPIO1_REG(0xA0) | ||
268 | #define MSM7X30_GPIO_INT_STATUS_1 MSM_GPIO2_REG(0x70) | ||
269 | #define MSM7X30_GPIO_INT_STATUS_2 MSM_GPIO1_REG(0xA4) | ||
270 | #define MSM7X30_GPIO_INT_STATUS_3 MSM_GPIO1_REG(0xA8) | ||
271 | #define MSM7X30_GPIO_INT_STATUS_4 MSM_GPIO1_REG(0xAC) | ||
272 | #define MSM7X30_GPIO_INT_STATUS_5 MSM_GPIO1_REG(0xB0) | ||
273 | #define MSM7X30_GPIO_INT_STATUS_6 MSM_GPIO1_REG(0xE0) | ||
274 | #define MSM7X30_GPIO_INT_STATUS_7 MSM_GPIO1_REG(0x234) | ||
26 | 275 | ||
27 | #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0) | 276 | #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0) |
28 | 277 | ||
diff --git a/arch/arm/mach-msm/gpio_hw.h b/arch/arm/mach-msm/gpio_hw.h deleted file mode 100644 index ba7972ade8c5..000000000000 --- a/arch/arm/mach-msm/gpio_hw.h +++ /dev/null | |||
@@ -1,272 +0,0 @@ | |||
1 | /* arch/arm/mach-msm/gpio_hw.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved. | ||
6 | * | ||
7 | * This software is licensed under the terms of the GNU General Public | ||
8 | * License version 2, as published by the Free Software Foundation, and | ||
9 | * may be copied, distributed, and modified under those terms. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ARCH_ARM_MACH_MSM_GPIO_HW_H | ||
19 | #define __ARCH_ARM_MACH_MSM_GPIO_HW_H | ||
20 | |||
21 | #include <mach/msm_iomap.h> | ||
22 | |||
23 | /* see 80-VA736-2 Rev C pp 695-751 | ||
24 | ** | ||
25 | ** These are actually the *shadow* gpio registers, since the | ||
26 | ** real ones (which allow full access) are only available to the | ||
27 | ** ARM9 side of the world. | ||
28 | ** | ||
29 | ** Since the _BASE need to be page-aligned when we're mapping them | ||
30 | ** to virtual addresses, adjust for the additional offset in these | ||
31 | ** macros. | ||
32 | */ | ||
33 | |||
34 | #define MSM_GPIO1_REG(off) (MSM_GPIO1_BASE + (off)) | ||
35 | #define MSM_GPIO2_REG(off) (MSM_GPIO2_BASE + 0x400 + (off)) | ||
36 | #define MSM_GPIO1_SHADOW_REG(off) (MSM_GPIO1_BASE + 0x800 + (off)) | ||
37 | #define MSM_GPIO2_SHADOW_REG(off) (MSM_GPIO2_BASE + 0xC00 + (off)) | ||
38 | |||
39 | /* | ||
40 | * MSM7X00 registers | ||
41 | */ | ||
42 | /* output value */ | ||
43 | #define MSM7X00_GPIO_OUT_0 MSM_GPIO1_SHADOW_REG(0x00) /* gpio 15-0 */ | ||
44 | #define MSM7X00_GPIO_OUT_1 MSM_GPIO2_SHADOW_REG(0x00) /* gpio 42-16 */ | ||
45 | #define MSM7X00_GPIO_OUT_2 MSM_GPIO1_SHADOW_REG(0x04) /* gpio 67-43 */ | ||
46 | #define MSM7X00_GPIO_OUT_3 MSM_GPIO1_SHADOW_REG(0x08) /* gpio 94-68 */ | ||
47 | #define MSM7X00_GPIO_OUT_4 MSM_GPIO1_SHADOW_REG(0x0C) /* gpio 106-95 */ | ||
48 | #define MSM7X00_GPIO_OUT_5 MSM_GPIO1_SHADOW_REG(0x50) /* gpio 107-121 */ | ||
49 | |||
50 | /* same pin map as above, output enable */ | ||
51 | #define MSM7X00_GPIO_OE_0 MSM_GPIO1_SHADOW_REG(0x10) | ||
52 | #define MSM7X00_GPIO_OE_1 MSM_GPIO2_SHADOW_REG(0x08) | ||
53 | #define MSM7X00_GPIO_OE_2 MSM_GPIO1_SHADOW_REG(0x14) | ||
54 | #define MSM7X00_GPIO_OE_3 MSM_GPIO1_SHADOW_REG(0x18) | ||
55 | #define MSM7X00_GPIO_OE_4 MSM_GPIO1_SHADOW_REG(0x1C) | ||
56 | #define MSM7X00_GPIO_OE_5 MSM_GPIO1_SHADOW_REG(0x54) | ||
57 | |||
58 | /* same pin map as above, input read */ | ||
59 | #define MSM7X00_GPIO_IN_0 MSM_GPIO1_SHADOW_REG(0x34) | ||
60 | #define MSM7X00_GPIO_IN_1 MSM_GPIO2_SHADOW_REG(0x20) | ||
61 | #define MSM7X00_GPIO_IN_2 MSM_GPIO1_SHADOW_REG(0x38) | ||
62 | #define MSM7X00_GPIO_IN_3 MSM_GPIO1_SHADOW_REG(0x3C) | ||
63 | #define MSM7X00_GPIO_IN_4 MSM_GPIO1_SHADOW_REG(0x40) | ||
64 | #define MSM7X00_GPIO_IN_5 MSM_GPIO1_SHADOW_REG(0x44) | ||
65 | |||
66 | /* same pin map as above, 1=edge 0=level interrup */ | ||
67 | #define MSM7X00_GPIO_INT_EDGE_0 MSM_GPIO1_SHADOW_REG(0x60) | ||
68 | #define MSM7X00_GPIO_INT_EDGE_1 MSM_GPIO2_SHADOW_REG(0x50) | ||
69 | #define MSM7X00_GPIO_INT_EDGE_2 MSM_GPIO1_SHADOW_REG(0x64) | ||
70 | #define MSM7X00_GPIO_INT_EDGE_3 MSM_GPIO1_SHADOW_REG(0x68) | ||
71 | #define MSM7X00_GPIO_INT_EDGE_4 MSM_GPIO1_SHADOW_REG(0x6C) | ||
72 | #define MSM7X00_GPIO_INT_EDGE_5 MSM_GPIO1_SHADOW_REG(0xC0) | ||
73 | |||
74 | /* same pin map as above, 1=positive 0=negative */ | ||
75 | #define MSM7X00_GPIO_INT_POS_0 MSM_GPIO1_SHADOW_REG(0x70) | ||
76 | #define MSM7X00_GPIO_INT_POS_1 MSM_GPIO2_SHADOW_REG(0x58) | ||
77 | #define MSM7X00_GPIO_INT_POS_2 MSM_GPIO1_SHADOW_REG(0x74) | ||
78 | #define MSM7X00_GPIO_INT_POS_3 MSM_GPIO1_SHADOW_REG(0x78) | ||
79 | #define MSM7X00_GPIO_INT_POS_4 MSM_GPIO1_SHADOW_REG(0x7C) | ||
80 | #define MSM7X00_GPIO_INT_POS_5 MSM_GPIO1_SHADOW_REG(0xBC) | ||
81 | |||
82 | /* same pin map as above, interrupt enable */ | ||
83 | #define MSM7X00_GPIO_INT_EN_0 MSM_GPIO1_SHADOW_REG(0x80) | ||
84 | #define MSM7X00_GPIO_INT_EN_1 MSM_GPIO2_SHADOW_REG(0x60) | ||
85 | #define MSM7X00_GPIO_INT_EN_2 MSM_GPIO1_SHADOW_REG(0x84) | ||
86 | #define MSM7X00_GPIO_INT_EN_3 MSM_GPIO1_SHADOW_REG(0x88) | ||
87 | #define MSM7X00_GPIO_INT_EN_4 MSM_GPIO1_SHADOW_REG(0x8C) | ||
88 | #define MSM7X00_GPIO_INT_EN_5 MSM_GPIO1_SHADOW_REG(0xB8) | ||
89 | |||
90 | /* same pin map as above, write 1 to clear interrupt */ | ||
91 | #define MSM7X00_GPIO_INT_CLEAR_0 MSM_GPIO1_SHADOW_REG(0x90) | ||
92 | #define MSM7X00_GPIO_INT_CLEAR_1 MSM_GPIO2_SHADOW_REG(0x68) | ||
93 | #define MSM7X00_GPIO_INT_CLEAR_2 MSM_GPIO1_SHADOW_REG(0x94) | ||
94 | #define MSM7X00_GPIO_INT_CLEAR_3 MSM_GPIO1_SHADOW_REG(0x98) | ||
95 | #define MSM7X00_GPIO_INT_CLEAR_4 MSM_GPIO1_SHADOW_REG(0x9C) | ||
96 | #define MSM7X00_GPIO_INT_CLEAR_5 MSM_GPIO1_SHADOW_REG(0xB4) | ||
97 | |||
98 | /* same pin map as above, 1=interrupt pending */ | ||
99 | #define MSM7X00_GPIO_INT_STATUS_0 MSM_GPIO1_SHADOW_REG(0xA0) | ||
100 | #define MSM7X00_GPIO_INT_STATUS_1 MSM_GPIO2_SHADOW_REG(0x70) | ||
101 | #define MSM7X00_GPIO_INT_STATUS_2 MSM_GPIO1_SHADOW_REG(0xA4) | ||
102 | #define MSM7X00_GPIO_INT_STATUS_3 MSM_GPIO1_SHADOW_REG(0xA8) | ||
103 | #define MSM7X00_GPIO_INT_STATUS_4 MSM_GPIO1_SHADOW_REG(0xAC) | ||
104 | #define MSM7X00_GPIO_INT_STATUS_5 MSM_GPIO1_SHADOW_REG(0xB0) | ||
105 | |||
106 | /* | ||
107 | * QSD8X50 registers | ||
108 | */ | ||
109 | /* output value */ | ||
110 | #define QSD8X50_GPIO_OUT_0 MSM_GPIO1_SHADOW_REG(0x00) /* gpio 15-0 */ | ||
111 | #define QSD8X50_GPIO_OUT_1 MSM_GPIO2_SHADOW_REG(0x00) /* gpio 42-16 */ | ||
112 | #define QSD8X50_GPIO_OUT_2 MSM_GPIO1_SHADOW_REG(0x04) /* gpio 67-43 */ | ||
113 | #define QSD8X50_GPIO_OUT_3 MSM_GPIO1_SHADOW_REG(0x08) /* gpio 94-68 */ | ||
114 | #define QSD8X50_GPIO_OUT_4 MSM_GPIO1_SHADOW_REG(0x0C) /* gpio 103-95 */ | ||
115 | #define QSD8X50_GPIO_OUT_5 MSM_GPIO1_SHADOW_REG(0x10) /* gpio 121-104 */ | ||
116 | #define QSD8X50_GPIO_OUT_6 MSM_GPIO1_SHADOW_REG(0x14) /* gpio 152-122 */ | ||
117 | #define QSD8X50_GPIO_OUT_7 MSM_GPIO1_SHADOW_REG(0x18) /* gpio 164-153 */ | ||
118 | |||
119 | /* same pin map as above, output enable */ | ||
120 | #define QSD8X50_GPIO_OE_0 MSM_GPIO1_SHADOW_REG(0x20) | ||
121 | #define QSD8X50_GPIO_OE_1 MSM_GPIO2_SHADOW_REG(0x08) | ||
122 | #define QSD8X50_GPIO_OE_2 MSM_GPIO1_SHADOW_REG(0x24) | ||
123 | #define QSD8X50_GPIO_OE_3 MSM_GPIO1_SHADOW_REG(0x28) | ||
124 | #define QSD8X50_GPIO_OE_4 MSM_GPIO1_SHADOW_REG(0x2C) | ||
125 | #define QSD8X50_GPIO_OE_5 MSM_GPIO1_SHADOW_REG(0x30) | ||
126 | #define QSD8X50_GPIO_OE_6 MSM_GPIO1_SHADOW_REG(0x34) | ||
127 | #define QSD8X50_GPIO_OE_7 MSM_GPIO1_SHADOW_REG(0x38) | ||
128 | |||
129 | /* same pin map as above, input read */ | ||
130 | #define QSD8X50_GPIO_IN_0 MSM_GPIO1_SHADOW_REG(0x50) | ||
131 | #define QSD8X50_GPIO_IN_1 MSM_GPIO2_SHADOW_REG(0x20) | ||
132 | #define QSD8X50_GPIO_IN_2 MSM_GPIO1_SHADOW_REG(0x54) | ||
133 | #define QSD8X50_GPIO_IN_3 MSM_GPIO1_SHADOW_REG(0x58) | ||
134 | #define QSD8X50_GPIO_IN_4 MSM_GPIO1_SHADOW_REG(0x5C) | ||
135 | #define QSD8X50_GPIO_IN_5 MSM_GPIO1_SHADOW_REG(0x60) | ||
136 | #define QSD8X50_GPIO_IN_6 MSM_GPIO1_SHADOW_REG(0x64) | ||
137 | #define QSD8X50_GPIO_IN_7 MSM_GPIO1_SHADOW_REG(0x68) | ||
138 | |||
139 | /* same pin map as above, 1=edge 0=level interrup */ | ||
140 | #define QSD8X50_GPIO_INT_EDGE_0 MSM_GPIO1_SHADOW_REG(0x70) | ||
141 | #define QSD8X50_GPIO_INT_EDGE_1 MSM_GPIO2_SHADOW_REG(0x50) | ||
142 | #define QSD8X50_GPIO_INT_EDGE_2 MSM_GPIO1_SHADOW_REG(0x74) | ||
143 | #define QSD8X50_GPIO_INT_EDGE_3 MSM_GPIO1_SHADOW_REG(0x78) | ||
144 | #define QSD8X50_GPIO_INT_EDGE_4 MSM_GPIO1_SHADOW_REG(0x7C) | ||
145 | #define QSD8X50_GPIO_INT_EDGE_5 MSM_GPIO1_SHADOW_REG(0x80) | ||
146 | #define QSD8X50_GPIO_INT_EDGE_6 MSM_GPIO1_SHADOW_REG(0x84) | ||
147 | #define QSD8X50_GPIO_INT_EDGE_7 MSM_GPIO1_SHADOW_REG(0x88) | ||
148 | |||
149 | /* same pin map as above, 1=positive 0=negative */ | ||
150 | #define QSD8X50_GPIO_INT_POS_0 MSM_GPIO1_SHADOW_REG(0x90) | ||
151 | #define QSD8X50_GPIO_INT_POS_1 MSM_GPIO2_SHADOW_REG(0x58) | ||
152 | #define QSD8X50_GPIO_INT_POS_2 MSM_GPIO1_SHADOW_REG(0x94) | ||
153 | #define QSD8X50_GPIO_INT_POS_3 MSM_GPIO1_SHADOW_REG(0x98) | ||
154 | #define QSD8X50_GPIO_INT_POS_4 MSM_GPIO1_SHADOW_REG(0x9C) | ||
155 | #define QSD8X50_GPIO_INT_POS_5 MSM_GPIO1_SHADOW_REG(0xA0) | ||
156 | #define QSD8X50_GPIO_INT_POS_6 MSM_GPIO1_SHADOW_REG(0xA4) | ||
157 | #define QSD8X50_GPIO_INT_POS_7 MSM_GPIO1_SHADOW_REG(0xA8) | ||
158 | |||
159 | /* same pin map as above, interrupt enable */ | ||
160 | #define QSD8X50_GPIO_INT_EN_0 MSM_GPIO1_SHADOW_REG(0xB0) | ||
161 | #define QSD8X50_GPIO_INT_EN_1 MSM_GPIO2_SHADOW_REG(0x60) | ||
162 | #define QSD8X50_GPIO_INT_EN_2 MSM_GPIO1_SHADOW_REG(0xB4) | ||
163 | #define QSD8X50_GPIO_INT_EN_3 MSM_GPIO1_SHADOW_REG(0xB8) | ||
164 | #define QSD8X50_GPIO_INT_EN_4 MSM_GPIO1_SHADOW_REG(0xBC) | ||
165 | #define QSD8X50_GPIO_INT_EN_5 MSM_GPIO1_SHADOW_REG(0xC0) | ||
166 | #define QSD8X50_GPIO_INT_EN_6 MSM_GPIO1_SHADOW_REG(0xC4) | ||
167 | #define QSD8X50_GPIO_INT_EN_7 MSM_GPIO1_SHADOW_REG(0xC8) | ||
168 | |||
169 | /* same pin map as above, write 1 to clear interrupt */ | ||
170 | #define QSD8X50_GPIO_INT_CLEAR_0 MSM_GPIO1_SHADOW_REG(0xD0) | ||
171 | #define QSD8X50_GPIO_INT_CLEAR_1 MSM_GPIO2_SHADOW_REG(0x68) | ||
172 | #define QSD8X50_GPIO_INT_CLEAR_2 MSM_GPIO1_SHADOW_REG(0xD4) | ||
173 | #define QSD8X50_GPIO_INT_CLEAR_3 MSM_GPIO1_SHADOW_REG(0xD8) | ||
174 | #define QSD8X50_GPIO_INT_CLEAR_4 MSM_GPIO1_SHADOW_REG(0xDC) | ||
175 | #define QSD8X50_GPIO_INT_CLEAR_5 MSM_GPIO1_SHADOW_REG(0xE0) | ||
176 | #define QSD8X50_GPIO_INT_CLEAR_6 MSM_GPIO1_SHADOW_REG(0xE4) | ||
177 | #define QSD8X50_GPIO_INT_CLEAR_7 MSM_GPIO1_SHADOW_REG(0xE8) | ||
178 | |||
179 | /* same pin map as above, 1=interrupt pending */ | ||
180 | #define QSD8X50_GPIO_INT_STATUS_0 MSM_GPIO1_SHADOW_REG(0xF0) | ||
181 | #define QSD8X50_GPIO_INT_STATUS_1 MSM_GPIO2_SHADOW_REG(0x70) | ||
182 | #define QSD8X50_GPIO_INT_STATUS_2 MSM_GPIO1_SHADOW_REG(0xF4) | ||
183 | #define QSD8X50_GPIO_INT_STATUS_3 MSM_GPIO1_SHADOW_REG(0xF8) | ||
184 | #define QSD8X50_GPIO_INT_STATUS_4 MSM_GPIO1_SHADOW_REG(0xFC) | ||
185 | #define QSD8X50_GPIO_INT_STATUS_5 MSM_GPIO1_SHADOW_REG(0x100) | ||
186 | #define QSD8X50_GPIO_INT_STATUS_6 MSM_GPIO1_SHADOW_REG(0x104) | ||
187 | #define QSD8X50_GPIO_INT_STATUS_7 MSM_GPIO1_SHADOW_REG(0x108) | ||
188 | |||
189 | /* | ||
190 | * MSM7X30 registers | ||
191 | */ | ||
192 | /* output value */ | ||
193 | #define MSM7X30_GPIO_OUT_0 MSM_GPIO1_REG(0x00) /* gpio 15-0 */ | ||
194 | #define MSM7X30_GPIO_OUT_1 MSM_GPIO2_REG(0x00) /* gpio 43-16 */ | ||
195 | #define MSM7X30_GPIO_OUT_2 MSM_GPIO1_REG(0x04) /* gpio 67-44 */ | ||
196 | #define MSM7X30_GPIO_OUT_3 MSM_GPIO1_REG(0x08) /* gpio 94-68 */ | ||
197 | #define MSM7X30_GPIO_OUT_4 MSM_GPIO1_REG(0x0C) /* gpio 106-95 */ | ||
198 | #define MSM7X30_GPIO_OUT_5 MSM_GPIO1_REG(0x50) /* gpio 133-107 */ | ||
199 | #define MSM7X30_GPIO_OUT_6 MSM_GPIO1_REG(0xC4) /* gpio 150-134 */ | ||
200 | #define MSM7X30_GPIO_OUT_7 MSM_GPIO1_REG(0x214) /* gpio 181-151 */ | ||
201 | |||
202 | /* same pin map as above, output enable */ | ||
203 | #define MSM7X30_GPIO_OE_0 MSM_GPIO1_REG(0x10) | ||
204 | #define MSM7X30_GPIO_OE_1 MSM_GPIO2_REG(0x08) | ||
205 | #define MSM7X30_GPIO_OE_2 MSM_GPIO1_REG(0x14) | ||
206 | #define MSM7X30_GPIO_OE_3 MSM_GPIO1_REG(0x18) | ||
207 | #define MSM7X30_GPIO_OE_4 MSM_GPIO1_REG(0x1C) | ||
208 | #define MSM7X30_GPIO_OE_5 MSM_GPIO1_REG(0x54) | ||
209 | #define MSM7X30_GPIO_OE_6 MSM_GPIO1_REG(0xC8) | ||
210 | #define MSM7X30_GPIO_OE_7 MSM_GPIO1_REG(0x218) | ||
211 | |||
212 | /* same pin map as above, input read */ | ||
213 | #define MSM7X30_GPIO_IN_0 MSM_GPIO1_REG(0x34) | ||
214 | #define MSM7X30_GPIO_IN_1 MSM_GPIO2_REG(0x20) | ||
215 | #define MSM7X30_GPIO_IN_2 MSM_GPIO1_REG(0x38) | ||
216 | #define MSM7X30_GPIO_IN_3 MSM_GPIO1_REG(0x3C) | ||
217 | #define MSM7X30_GPIO_IN_4 MSM_GPIO1_REG(0x40) | ||
218 | #define MSM7X30_GPIO_IN_5 MSM_GPIO1_REG(0x44) | ||
219 | #define MSM7X30_GPIO_IN_6 MSM_GPIO1_REG(0xCC) | ||
220 | #define MSM7X30_GPIO_IN_7 MSM_GPIO1_REG(0x21C) | ||
221 | |||
222 | /* same pin map as above, 1=edge 0=level interrup */ | ||
223 | #define MSM7X30_GPIO_INT_EDGE_0 MSM_GPIO1_REG(0x60) | ||
224 | #define MSM7X30_GPIO_INT_EDGE_1 MSM_GPIO2_REG(0x50) | ||
225 | #define MSM7X30_GPIO_INT_EDGE_2 MSM_GPIO1_REG(0x64) | ||
226 | #define MSM7X30_GPIO_INT_EDGE_3 MSM_GPIO1_REG(0x68) | ||
227 | #define MSM7X30_GPIO_INT_EDGE_4 MSM_GPIO1_REG(0x6C) | ||
228 | #define MSM7X30_GPIO_INT_EDGE_5 MSM_GPIO1_REG(0xC0) | ||
229 | #define MSM7X30_GPIO_INT_EDGE_6 MSM_GPIO1_REG(0xD0) | ||
230 | #define MSM7X30_GPIO_INT_EDGE_7 MSM_GPIO1_REG(0x240) | ||
231 | |||
232 | /* same pin map as above, 1=positive 0=negative */ | ||
233 | #define MSM7X30_GPIO_INT_POS_0 MSM_GPIO1_REG(0x70) | ||
234 | #define MSM7X30_GPIO_INT_POS_1 MSM_GPIO2_REG(0x58) | ||
235 | #define MSM7X30_GPIO_INT_POS_2 MSM_GPIO1_REG(0x74) | ||
236 | #define MSM7X30_GPIO_INT_POS_3 MSM_GPIO1_REG(0x78) | ||
237 | #define MSM7X30_GPIO_INT_POS_4 MSM_GPIO1_REG(0x7C) | ||
238 | #define MSM7X30_GPIO_INT_POS_5 MSM_GPIO1_REG(0xBC) | ||
239 | #define MSM7X30_GPIO_INT_POS_6 MSM_GPIO1_REG(0xD4) | ||
240 | #define MSM7X30_GPIO_INT_POS_7 MSM_GPIO1_REG(0x228) | ||
241 | |||
242 | /* same pin map as above, interrupt enable */ | ||
243 | #define MSM7X30_GPIO_INT_EN_0 MSM_GPIO1_REG(0x80) | ||
244 | #define MSM7X30_GPIO_INT_EN_1 MSM_GPIO2_REG(0x60) | ||
245 | #define MSM7X30_GPIO_INT_EN_2 MSM_GPIO1_REG(0x84) | ||
246 | #define MSM7X30_GPIO_INT_EN_3 MSM_GPIO1_REG(0x88) | ||
247 | #define MSM7X30_GPIO_INT_EN_4 MSM_GPIO1_REG(0x8C) | ||
248 | #define MSM7X30_GPIO_INT_EN_5 MSM_GPIO1_REG(0xB8) | ||
249 | #define MSM7X30_GPIO_INT_EN_6 MSM_GPIO1_REG(0xD8) | ||
250 | #define MSM7X30_GPIO_INT_EN_7 MSM_GPIO1_REG(0x22C) | ||
251 | |||
252 | /* same pin map as above, write 1 to clear interrupt */ | ||
253 | #define MSM7X30_GPIO_INT_CLEAR_0 MSM_GPIO1_REG(0x90) | ||
254 | #define MSM7X30_GPIO_INT_CLEAR_1 MSM_GPIO2_REG(0x68) | ||
255 | #define MSM7X30_GPIO_INT_CLEAR_2 MSM_GPIO1_REG(0x94) | ||
256 | #define MSM7X30_GPIO_INT_CLEAR_3 MSM_GPIO1_REG(0x98) | ||
257 | #define MSM7X30_GPIO_INT_CLEAR_4 MSM_GPIO1_REG(0x9C) | ||
258 | #define MSM7X30_GPIO_INT_CLEAR_5 MSM_GPIO1_REG(0xB4) | ||
259 | #define MSM7X30_GPIO_INT_CLEAR_6 MSM_GPIO1_REG(0xDC) | ||
260 | #define MSM7X30_GPIO_INT_CLEAR_7 MSM_GPIO1_REG(0x230) | ||
261 | |||
262 | /* same pin map as above, 1=interrupt pending */ | ||
263 | #define MSM7X30_GPIO_INT_STATUS_0 MSM_GPIO1_REG(0xA0) | ||
264 | #define MSM7X30_GPIO_INT_STATUS_1 MSM_GPIO2_REG(0x70) | ||
265 | #define MSM7X30_GPIO_INT_STATUS_2 MSM_GPIO1_REG(0xA4) | ||
266 | #define MSM7X30_GPIO_INT_STATUS_3 MSM_GPIO1_REG(0xA8) | ||
267 | #define MSM7X30_GPIO_INT_STATUS_4 MSM_GPIO1_REG(0xAC) | ||
268 | #define MSM7X30_GPIO_INT_STATUS_5 MSM_GPIO1_REG(0xB0) | ||
269 | #define MSM7X30_GPIO_INT_STATUS_6 MSM_GPIO1_REG(0xE0) | ||
270 | #define MSM7X30_GPIO_INT_STATUS_7 MSM_GPIO1_REG(0x234) | ||
271 | |||
272 | #endif | ||