diff options
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 264 | ||||
-rw-r--r-- | arch/blackfin/mach-bf518/include/mach/gpio.h | 60 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/gpio.h | 68 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/include/mach/gpio.h | 34 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/include/mach/gpio.h | 68 | ||||
-rw-r--r-- | arch/blackfin/mach-bf538/include/mach/gpio.h | 79 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/include/mach/gpio.h | 68 |
7 files changed, 379 insertions, 262 deletions
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 4ee687f34fee..9477d82fcad2 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -91,6 +91,8 @@ | |||
91 | #define GPIO_BANKSIZE 16 | 91 | #define GPIO_BANKSIZE 16 |
92 | #define GPIO_BANK_NUM DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE) | 92 | #define GPIO_BANK_NUM DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE) |
93 | 93 | ||
94 | #include <mach/gpio.h> | ||
95 | |||
94 | #define GPIO_0 0 | 96 | #define GPIO_0 0 |
95 | #define GPIO_1 1 | 97 | #define GPIO_1 1 |
96 | #define GPIO_2 2 | 98 | #define GPIO_2 2 |
@@ -140,270 +142,9 @@ | |||
140 | #define GPIO_46 46 | 142 | #define GPIO_46 46 |
141 | #define GPIO_47 47 | 143 | #define GPIO_47 47 |
142 | 144 | ||
143 | |||
144 | #define PERIPHERAL_USAGE 1 | 145 | #define PERIPHERAL_USAGE 1 |
145 | #define GPIO_USAGE 0 | 146 | #define GPIO_USAGE 0 |
146 | 147 | ||
147 | #if defined(BF518_FAMILY) | ||
148 | #define MAX_BLACKFIN_GPIOS 40 | ||
149 | |||
150 | #define GPIO_PF0 0 | ||
151 | #define GPIO_PF1 1 | ||
152 | #define GPIO_PF2 2 | ||
153 | #define GPIO_PF3 3 | ||
154 | #define GPIO_PF4 4 | ||
155 | #define GPIO_PF5 5 | ||
156 | #define GPIO_PF6 6 | ||
157 | #define GPIO_PF7 7 | ||
158 | #define GPIO_PF8 8 | ||
159 | #define GPIO_PF9 9 | ||
160 | #define GPIO_PF10 10 | ||
161 | #define GPIO_PF11 11 | ||
162 | #define GPIO_PF12 12 | ||
163 | #define GPIO_PF13 13 | ||
164 | #define GPIO_PF14 14 | ||
165 | #define GPIO_PF15 15 | ||
166 | #define GPIO_PG0 16 | ||
167 | #define GPIO_PG1 17 | ||
168 | #define GPIO_PG2 18 | ||
169 | #define GPIO_PG3 19 | ||
170 | #define GPIO_PG4 20 | ||
171 | #define GPIO_PG5 21 | ||
172 | #define GPIO_PG6 22 | ||
173 | #define GPIO_PG7 23 | ||
174 | #define GPIO_PG8 24 | ||
175 | #define GPIO_PG9 25 | ||
176 | #define GPIO_PG10 26 | ||
177 | #define GPIO_PG11 27 | ||
178 | #define GPIO_PG12 28 | ||
179 | #define GPIO_PG13 29 | ||
180 | #define GPIO_PG14 30 | ||
181 | #define GPIO_PG15 31 | ||
182 | #define GPIO_PH0 32 | ||
183 | #define GPIO_PH1 33 | ||
184 | #define GPIO_PH2 34 | ||
185 | #define GPIO_PH3 35 | ||
186 | #define GPIO_PH4 36 | ||
187 | #define GPIO_PH5 37 | ||
188 | #define GPIO_PH6 38 | ||
189 | #define GPIO_PH7 39 | ||
190 | |||
191 | #define PORT_F GPIO_PF0 | ||
192 | #define PORT_G GPIO_PG0 | ||
193 | #define PORT_H GPIO_PH0 | ||
194 | |||
195 | #endif | ||
196 | |||
197 | |||
198 | #ifdef BF533_FAMILY | ||
199 | #define MAX_BLACKFIN_GPIOS 16 | ||
200 | |||
201 | #define GPIO_PF0 0 | ||
202 | #define GPIO_PF1 1 | ||
203 | #define GPIO_PF2 2 | ||
204 | #define GPIO_PF3 3 | ||
205 | #define GPIO_PF4 4 | ||
206 | #define GPIO_PF5 5 | ||
207 | #define GPIO_PF6 6 | ||
208 | #define GPIO_PF7 7 | ||
209 | #define GPIO_PF8 8 | ||
210 | #define GPIO_PF9 9 | ||
211 | #define GPIO_PF10 10 | ||
212 | #define GPIO_PF11 11 | ||
213 | #define GPIO_PF12 12 | ||
214 | #define GPIO_PF13 13 | ||
215 | #define GPIO_PF14 14 | ||
216 | #define GPIO_PF15 15 | ||
217 | |||
218 | #endif | ||
219 | |||
220 | #if defined(BF538_FAMILY) | ||
221 | /* FIXME: | ||
222 | * For now only support PORTF GPIOs. | ||
223 | * PORT C,D and E are for peripheral usage only | ||
224 | */ | ||
225 | #define MAX_BLACKFIN_GPIOS 16 | ||
226 | |||
227 | #define GPIO_PF0 0 /* PF */ | ||
228 | #define GPIO_PF1 1 | ||
229 | #define GPIO_PF2 2 | ||
230 | #define GPIO_PF3 3 | ||
231 | #define GPIO_PF4 4 | ||
232 | #define GPIO_PF5 5 | ||
233 | #define GPIO_PF6 6 | ||
234 | #define GPIO_PF7 7 | ||
235 | #define GPIO_PF8 8 | ||
236 | #define GPIO_PF9 9 | ||
237 | #define GPIO_PF10 10 | ||
238 | #define GPIO_PF11 11 | ||
239 | #define GPIO_PF12 12 | ||
240 | #define GPIO_PF13 13 | ||
241 | #define GPIO_PF14 14 | ||
242 | #define GPIO_PF15 15 | ||
243 | #define GPIO_PC0 16 /* PC */ | ||
244 | #define GPIO_PC1 17 | ||
245 | #define GPIO_PC4 20 | ||
246 | #define GPIO_PC5 21 | ||
247 | #define GPIO_PC6 22 | ||
248 | #define GPIO_PC7 23 | ||
249 | #define GPIO_PC8 24 | ||
250 | #define GPIO_PC9 25 | ||
251 | #define GPIO_PD0 32 /* PD */ | ||
252 | #define GPIO_PD1 33 | ||
253 | #define GPIO_PD2 34 | ||
254 | #define GPIO_PD3 35 | ||
255 | #define GPIO_PD4 36 | ||
256 | #define GPIO_PD5 37 | ||
257 | #define GPIO_PD6 38 | ||
258 | #define GPIO_PD7 39 | ||
259 | #define GPIO_PD8 40 | ||
260 | #define GPIO_PD9 41 | ||
261 | #define GPIO_PD10 42 | ||
262 | #define GPIO_PD11 43 | ||
263 | #define GPIO_PD12 44 | ||
264 | #define GPIO_PD13 45 | ||
265 | #define GPIO_PE0 48 /* PE */ | ||
266 | #define GPIO_PE1 49 | ||
267 | #define GPIO_PE2 50 | ||
268 | #define GPIO_PE3 51 | ||
269 | #define GPIO_PE4 52 | ||
270 | #define GPIO_PE5 53 | ||
271 | #define GPIO_PE6 54 | ||
272 | #define GPIO_PE7 55 | ||
273 | #define GPIO_PE8 56 | ||
274 | #define GPIO_PE9 57 | ||
275 | #define GPIO_PE10 58 | ||
276 | #define GPIO_PE11 59 | ||
277 | #define GPIO_PE12 60 | ||
278 | #define GPIO_PE13 61 | ||
279 | #define GPIO_PE14 62 | ||
280 | #define GPIO_PE15 63 | ||
281 | |||
282 | #define PORT_F GPIO_PF0 | ||
283 | #define PORT_C GPIO_PC0 | ||
284 | #define PORT_D GPIO_PD0 | ||
285 | #define PORT_E GPIO_PE0 | ||
286 | #endif | ||
287 | |||
288 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | ||
289 | #define MAX_BLACKFIN_GPIOS 48 | ||
290 | |||
291 | #define GPIO_PF0 0 | ||
292 | #define GPIO_PF1 1 | ||
293 | #define GPIO_PF2 2 | ||
294 | #define GPIO_PF3 3 | ||
295 | #define GPIO_PF4 4 | ||
296 | #define GPIO_PF5 5 | ||
297 | #define GPIO_PF6 6 | ||
298 | #define GPIO_PF7 7 | ||
299 | #define GPIO_PF8 8 | ||
300 | #define GPIO_PF9 9 | ||
301 | #define GPIO_PF10 10 | ||
302 | #define GPIO_PF11 11 | ||
303 | #define GPIO_PF12 12 | ||
304 | #define GPIO_PF13 13 | ||
305 | #define GPIO_PF14 14 | ||
306 | #define GPIO_PF15 15 | ||
307 | #define GPIO_PG0 16 | ||
308 | #define GPIO_PG1 17 | ||
309 | #define GPIO_PG2 18 | ||
310 | #define GPIO_PG3 19 | ||
311 | #define GPIO_PG4 20 | ||
312 | #define GPIO_PG5 21 | ||
313 | #define GPIO_PG6 22 | ||
314 | #define GPIO_PG7 23 | ||
315 | #define GPIO_PG8 24 | ||
316 | #define GPIO_PG9 25 | ||
317 | #define GPIO_PG10 26 | ||
318 | #define GPIO_PG11 27 | ||
319 | #define GPIO_PG12 28 | ||
320 | #define GPIO_PG13 29 | ||
321 | #define GPIO_PG14 30 | ||
322 | #define GPIO_PG15 31 | ||
323 | #define GPIO_PH0 32 | ||
324 | #define GPIO_PH1 33 | ||
325 | #define GPIO_PH2 34 | ||
326 | #define GPIO_PH3 35 | ||
327 | #define GPIO_PH4 36 | ||
328 | #define GPIO_PH5 37 | ||
329 | #define GPIO_PH6 38 | ||
330 | #define GPIO_PH7 39 | ||
331 | #define GPIO_PH8 40 | ||
332 | #define GPIO_PH9 41 | ||
333 | #define GPIO_PH10 42 | ||
334 | #define GPIO_PH11 43 | ||
335 | #define GPIO_PH12 44 | ||
336 | #define GPIO_PH13 45 | ||
337 | #define GPIO_PH14 46 | ||
338 | #define GPIO_PH15 47 | ||
339 | |||
340 | #define PORT_F GPIO_PF0 | ||
341 | #define PORT_G GPIO_PG0 | ||
342 | #define PORT_H GPIO_PH0 | ||
343 | |||
344 | #endif | ||
345 | |||
346 | #ifdef BF548_FAMILY | ||
347 | #include <mach/gpio.h> | ||
348 | #endif | ||
349 | |||
350 | #ifdef BF561_FAMILY | ||
351 | #define MAX_BLACKFIN_GPIOS 48 | ||
352 | |||
353 | #define GPIO_PF0 0 | ||
354 | #define GPIO_PF1 1 | ||
355 | #define GPIO_PF2 2 | ||
356 | #define GPIO_PF3 3 | ||
357 | #define GPIO_PF4 4 | ||
358 | #define GPIO_PF5 5 | ||
359 | #define GPIO_PF6 6 | ||
360 | #define GPIO_PF7 7 | ||
361 | #define GPIO_PF8 8 | ||
362 | #define GPIO_PF9 9 | ||
363 | #define GPIO_PF10 10 | ||
364 | #define GPIO_PF11 11 | ||
365 | #define GPIO_PF12 12 | ||
366 | #define GPIO_PF13 13 | ||
367 | #define GPIO_PF14 14 | ||
368 | #define GPIO_PF15 15 | ||
369 | #define GPIO_PF16 16 | ||
370 | #define GPIO_PF17 17 | ||
371 | #define GPIO_PF18 18 | ||
372 | #define GPIO_PF19 19 | ||
373 | #define GPIO_PF20 20 | ||
374 | #define GPIO_PF21 21 | ||
375 | #define GPIO_PF22 22 | ||
376 | #define GPIO_PF23 23 | ||
377 | #define GPIO_PF24 24 | ||
378 | #define GPIO_PF25 25 | ||
379 | #define GPIO_PF26 26 | ||
380 | #define GPIO_PF27 27 | ||
381 | #define GPIO_PF28 28 | ||
382 | #define GPIO_PF29 29 | ||
383 | #define GPIO_PF30 30 | ||
384 | #define GPIO_PF31 31 | ||
385 | #define GPIO_PF32 32 | ||
386 | #define GPIO_PF33 33 | ||
387 | #define GPIO_PF34 34 | ||
388 | #define GPIO_PF35 35 | ||
389 | #define GPIO_PF36 36 | ||
390 | #define GPIO_PF37 37 | ||
391 | #define GPIO_PF38 38 | ||
392 | #define GPIO_PF39 39 | ||
393 | #define GPIO_PF40 40 | ||
394 | #define GPIO_PF41 41 | ||
395 | #define GPIO_PF42 42 | ||
396 | #define GPIO_PF43 43 | ||
397 | #define GPIO_PF44 44 | ||
398 | #define GPIO_PF45 45 | ||
399 | #define GPIO_PF46 46 | ||
400 | #define GPIO_PF47 47 | ||
401 | |||
402 | #define PORT_FIO0 GPIO_0 | ||
403 | #define PORT_FIO1 GPIO_16 | ||
404 | #define PORT_FIO2 GPIO_32 | ||
405 | #endif | ||
406 | |||
407 | #ifndef __ASSEMBLY__ | 148 | #ifndef __ASSEMBLY__ |
408 | 149 | ||
409 | /*********************************************************** | 150 | /*********************************************************** |
@@ -545,7 +286,6 @@ struct gpio_port_s { | |||
545 | * MODIFICATION HISTORY : | 286 | * MODIFICATION HISTORY : |
546 | **************************************************************/ | 287 | **************************************************************/ |
547 | 288 | ||
548 | |||
549 | int bfin_gpio_request(unsigned gpio, const char *label); | 289 | int bfin_gpio_request(unsigned gpio, const char *label); |
550 | void bfin_gpio_free(unsigned gpio); | 290 | void bfin_gpio_free(unsigned gpio); |
551 | int bfin_gpio_irq_request(unsigned gpio, const char *label); | 291 | int bfin_gpio_irq_request(unsigned gpio, const char *label); |
diff --git a/arch/blackfin/mach-bf518/include/mach/gpio.h b/arch/blackfin/mach-bf518/include/mach/gpio.h new file mode 100644 index 000000000000..9757683c3948 --- /dev/null +++ b/arch/blackfin/mach-bf518/include/mach/gpio.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf518/include/mach/gpio.h | ||
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
4 | * | ||
5 | * Copyright (C) 2008 Analog Devices Inc. | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #ifndef _MACH_GPIO_H_ | ||
11 | #define _MACH_GPIO_H_ | ||
12 | |||
13 | #define MAX_BLACKFIN_GPIOS 40 | ||
14 | |||
15 | #define GPIO_PF0 0 | ||
16 | #define GPIO_PF1 1 | ||
17 | #define GPIO_PF2 2 | ||
18 | #define GPIO_PF3 3 | ||
19 | #define GPIO_PF4 4 | ||
20 | #define GPIO_PF5 5 | ||
21 | #define GPIO_PF6 6 | ||
22 | #define GPIO_PF7 7 | ||
23 | #define GPIO_PF8 8 | ||
24 | #define GPIO_PF9 9 | ||
25 | #define GPIO_PF10 10 | ||
26 | #define GPIO_PF11 11 | ||
27 | #define GPIO_PF12 12 | ||
28 | #define GPIO_PF13 13 | ||
29 | #define GPIO_PF14 14 | ||
30 | #define GPIO_PF15 15 | ||
31 | #define GPIO_PG0 16 | ||
32 | #define GPIO_PG1 17 | ||
33 | #define GPIO_PG2 18 | ||
34 | #define GPIO_PG3 19 | ||
35 | #define GPIO_PG4 20 | ||
36 | #define GPIO_PG5 21 | ||
37 | #define GPIO_PG6 22 | ||
38 | #define GPIO_PG7 23 | ||
39 | #define GPIO_PG8 24 | ||
40 | #define GPIO_PG9 25 | ||
41 | #define GPIO_PG10 26 | ||
42 | #define GPIO_PG11 27 | ||
43 | #define GPIO_PG12 28 | ||
44 | #define GPIO_PG13 29 | ||
45 | #define GPIO_PG14 30 | ||
46 | #define GPIO_PG15 31 | ||
47 | #define GPIO_PH0 32 | ||
48 | #define GPIO_PH1 33 | ||
49 | #define GPIO_PH2 34 | ||
50 | #define GPIO_PH3 35 | ||
51 | #define GPIO_PH4 36 | ||
52 | #define GPIO_PH5 37 | ||
53 | #define GPIO_PH6 38 | ||
54 | #define GPIO_PH7 39 | ||
55 | |||
56 | #define PORT_F GPIO_PF0 | ||
57 | #define PORT_G GPIO_PG0 | ||
58 | #define PORT_H GPIO_PH0 | ||
59 | |||
60 | #endif /* _MACH_GPIO_H_ */ | ||
diff --git a/arch/blackfin/mach-bf527/include/mach/gpio.h b/arch/blackfin/mach-bf527/include/mach/gpio.h new file mode 100644 index 000000000000..06b6eebf0d49 --- /dev/null +++ b/arch/blackfin/mach-bf527/include/mach/gpio.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf527/include/mach/gpio.h | ||
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
4 | * | ||
5 | * Copyright (C) 2008 Analog Devices Inc. | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #ifndef _MACH_GPIO_H_ | ||
11 | #define _MACH_GPIO_H_ | ||
12 | |||
13 | #define MAX_BLACKFIN_GPIOS 48 | ||
14 | |||
15 | #define GPIO_PF0 0 | ||
16 | #define GPIO_PF1 1 | ||
17 | #define GPIO_PF2 2 | ||
18 | #define GPIO_PF3 3 | ||
19 | #define GPIO_PF4 4 | ||
20 | #define GPIO_PF5 5 | ||
21 | #define GPIO_PF6 6 | ||
22 | #define GPIO_PF7 7 | ||
23 | #define GPIO_PF8 8 | ||
24 | #define GPIO_PF9 9 | ||
25 | #define GPIO_PF10 10 | ||
26 | #define GPIO_PF11 11 | ||
27 | #define GPIO_PF12 12 | ||
28 | #define GPIO_PF13 13 | ||
29 | #define GPIO_PF14 14 | ||
30 | #define GPIO_PF15 15 | ||
31 | #define GPIO_PG0 16 | ||
32 | #define GPIO_PG1 17 | ||
33 | #define GPIO_PG2 18 | ||
34 | #define GPIO_PG3 19 | ||
35 | #define GPIO_PG4 20 | ||
36 | #define GPIO_PG5 21 | ||
37 | #define GPIO_PG6 22 | ||
38 | #define GPIO_PG7 23 | ||
39 | #define GPIO_PG8 24 | ||
40 | #define GPIO_PG9 25 | ||
41 | #define GPIO_PG10 26 | ||
42 | #define GPIO_PG11 27 | ||
43 | #define GPIO_PG12 28 | ||
44 | #define GPIO_PG13 29 | ||
45 | #define GPIO_PG14 30 | ||
46 | #define GPIO_PG15 31 | ||
47 | #define GPIO_PH0 32 | ||
48 | #define GPIO_PH1 33 | ||
49 | #define GPIO_PH2 34 | ||
50 | #define GPIO_PH3 35 | ||
51 | #define GPIO_PH4 36 | ||
52 | #define GPIO_PH5 37 | ||
53 | #define GPIO_PH6 38 | ||
54 | #define GPIO_PH7 39 | ||
55 | #define GPIO_PH8 40 | ||
56 | #define GPIO_PH9 41 | ||
57 | #define GPIO_PH10 42 | ||
58 | #define GPIO_PH11 43 | ||
59 | #define GPIO_PH12 44 | ||
60 | #define GPIO_PH13 45 | ||
61 | #define GPIO_PH14 46 | ||
62 | #define GPIO_PH15 47 | ||
63 | |||
64 | #define PORT_F GPIO_PF0 | ||
65 | #define PORT_G GPIO_PG0 | ||
66 | #define PORT_H GPIO_PH0 | ||
67 | |||
68 | #endif /* _MACH_GPIO_H_ */ | ||
diff --git a/arch/blackfin/mach-bf533/include/mach/gpio.h b/arch/blackfin/mach-bf533/include/mach/gpio.h new file mode 100644 index 000000000000..4d3ee4504250 --- /dev/null +++ b/arch/blackfin/mach-bf533/include/mach/gpio.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf533/include/mach/gpio.h | ||
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
4 | * | ||
5 | * Copyright (C) 2008 Analog Devices Inc. | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #ifndef _MACH_GPIO_H_ | ||
11 | #define _MACH_GPIO_H_ | ||
12 | |||
13 | #define MAX_BLACKFIN_GPIOS 48 | ||
14 | |||
15 | #define GPIO_PF0 0 | ||
16 | #define GPIO_PF1 1 | ||
17 | #define GPIO_PF2 2 | ||
18 | #define GPIO_PF3 3 | ||
19 | #define GPIO_PF4 4 | ||
20 | #define GPIO_PF5 5 | ||
21 | #define GPIO_PF6 6 | ||
22 | #define GPIO_PF7 7 | ||
23 | #define GPIO_PF8 8 | ||
24 | #define GPIO_PF9 9 | ||
25 | #define GPIO_PF10 10 | ||
26 | #define GPIO_PF11 11 | ||
27 | #define GPIO_PF12 12 | ||
28 | #define GPIO_PF13 13 | ||
29 | #define GPIO_PF14 14 | ||
30 | #define GPIO_PF15 15 | ||
31 | |||
32 | #define PORT_F GPIO_PF0 | ||
33 | |||
34 | #endif /* _MACH_GPIO_H_ */ | ||
diff --git a/arch/blackfin/mach-bf537/include/mach/gpio.h b/arch/blackfin/mach-bf537/include/mach/gpio.h new file mode 100644 index 000000000000..d77a31e45a30 --- /dev/null +++ b/arch/blackfin/mach-bf537/include/mach/gpio.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf537/include/mach/gpio.h | ||
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
4 | * | ||
5 | * Copyright (C) 2008 Analog Devices Inc. | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #ifndef _MACH_GPIO_H_ | ||
11 | #define _MACH_GPIO_H_ | ||
12 | |||
13 | #define MAX_BLACKFIN_GPIOS 48 | ||
14 | |||
15 | #define GPIO_PF0 0 | ||
16 | #define GPIO_PF1 1 | ||
17 | #define GPIO_PF2 2 | ||
18 | #define GPIO_PF3 3 | ||
19 | #define GPIO_PF4 4 | ||
20 | #define GPIO_PF5 5 | ||
21 | #define GPIO_PF6 6 | ||
22 | #define GPIO_PF7 7 | ||
23 | #define GPIO_PF8 8 | ||
24 | #define GPIO_PF9 9 | ||
25 | #define GPIO_PF10 10 | ||
26 | #define GPIO_PF11 11 | ||
27 | #define GPIO_PF12 12 | ||
28 | #define GPIO_PF13 13 | ||
29 | #define GPIO_PF14 14 | ||
30 | #define GPIO_PF15 15 | ||
31 | #define GPIO_PG0 16 | ||
32 | #define GPIO_PG1 17 | ||
33 | #define GPIO_PG2 18 | ||
34 | #define GPIO_PG3 19 | ||
35 | #define GPIO_PG4 20 | ||
36 | #define GPIO_PG5 21 | ||
37 | #define GPIO_PG6 22 | ||
38 | #define GPIO_PG7 23 | ||
39 | #define GPIO_PG8 24 | ||
40 | #define GPIO_PG9 25 | ||
41 | #define GPIO_PG10 26 | ||
42 | #define GPIO_PG11 27 | ||
43 | #define GPIO_PG12 28 | ||
44 | #define GPIO_PG13 29 | ||
45 | #define GPIO_PG14 30 | ||
46 | #define GPIO_PG15 31 | ||
47 | #define GPIO_PH0 32 | ||
48 | #define GPIO_PH1 33 | ||
49 | #define GPIO_PH2 34 | ||
50 | #define GPIO_PH3 35 | ||
51 | #define GPIO_PH4 36 | ||
52 | #define GPIO_PH5 37 | ||
53 | #define GPIO_PH6 38 | ||
54 | #define GPIO_PH7 39 | ||
55 | #define GPIO_PH8 40 | ||
56 | #define GPIO_PH9 41 | ||
57 | #define GPIO_PH10 42 | ||
58 | #define GPIO_PH11 43 | ||
59 | #define GPIO_PH12 44 | ||
60 | #define GPIO_PH13 45 | ||
61 | #define GPIO_PH14 46 | ||
62 | #define GPIO_PH15 47 | ||
63 | |||
64 | #define PORT_F GPIO_PF0 | ||
65 | #define PORT_G GPIO_PG0 | ||
66 | #define PORT_H GPIO_PH0 | ||
67 | |||
68 | #endif /* _MACH_GPIO_H_ */ | ||
diff --git a/arch/blackfin/mach-bf538/include/mach/gpio.h b/arch/blackfin/mach-bf538/include/mach/gpio.h new file mode 100644 index 000000000000..30f4f723f7cc --- /dev/null +++ b/arch/blackfin/mach-bf538/include/mach/gpio.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf538/include/mach/gpio.h | ||
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
4 | * | ||
5 | * Copyright (C) 2008 Analog Devices Inc. | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #ifndef _MACH_GPIO_H_ | ||
11 | #define _MACH_GPIO_H_ | ||
12 | |||
13 | /* FIXME: | ||
14 | * For now only support PORTF GPIOs. | ||
15 | * PORT C,D and E are for peripheral usage only | ||
16 | */ | ||
17 | #define MAX_BLACKFIN_GPIOS 16 | ||
18 | |||
19 | #define GPIO_PF0 0 /* PF */ | ||
20 | #define GPIO_PF1 1 | ||
21 | #define GPIO_PF2 2 | ||
22 | #define GPIO_PF3 3 | ||
23 | #define GPIO_PF4 4 | ||
24 | #define GPIO_PF5 5 | ||
25 | #define GPIO_PF6 6 | ||
26 | #define GPIO_PF7 7 | ||
27 | #define GPIO_PF8 8 | ||
28 | #define GPIO_PF9 9 | ||
29 | #define GPIO_PF10 10 | ||
30 | #define GPIO_PF11 11 | ||
31 | #define GPIO_PF12 12 | ||
32 | #define GPIO_PF13 13 | ||
33 | #define GPIO_PF14 14 | ||
34 | #define GPIO_PF15 15 | ||
35 | #define GPIO_PC0 16 /* PC */ | ||
36 | #define GPIO_PC1 17 | ||
37 | #define GPIO_PC4 20 | ||
38 | #define GPIO_PC5 21 | ||
39 | #define GPIO_PC6 22 | ||
40 | #define GPIO_PC7 23 | ||
41 | #define GPIO_PC8 24 | ||
42 | #define GPIO_PC9 25 | ||
43 | #define GPIO_PD0 32 /* PD */ | ||
44 | #define GPIO_PD1 33 | ||
45 | #define GPIO_PD2 34 | ||
46 | #define GPIO_PD3 35 | ||
47 | #define GPIO_PD4 36 | ||
48 | #define GPIO_PD5 37 | ||
49 | #define GPIO_PD6 38 | ||
50 | #define GPIO_PD7 39 | ||
51 | #define GPIO_PD8 40 | ||
52 | #define GPIO_PD9 41 | ||
53 | #define GPIO_PD10 42 | ||
54 | #define GPIO_PD11 43 | ||
55 | #define GPIO_PD12 44 | ||
56 | #define GPIO_PD13 45 | ||
57 | #define GPIO_PE0 48 /* PE */ | ||
58 | #define GPIO_PE1 49 | ||
59 | #define GPIO_PE2 50 | ||
60 | #define GPIO_PE3 51 | ||
61 | #define GPIO_PE4 52 | ||
62 | #define GPIO_PE5 53 | ||
63 | #define GPIO_PE6 54 | ||
64 | #define GPIO_PE7 55 | ||
65 | #define GPIO_PE8 56 | ||
66 | #define GPIO_PE9 57 | ||
67 | #define GPIO_PE10 58 | ||
68 | #define GPIO_PE11 59 | ||
69 | #define GPIO_PE12 60 | ||
70 | #define GPIO_PE13 61 | ||
71 | #define GPIO_PE14 62 | ||
72 | #define GPIO_PE15 63 | ||
73 | |||
74 | #define PORT_F GPIO_PF0 | ||
75 | #define PORT_C GPIO_PC0 | ||
76 | #define PORT_D GPIO_PD0 | ||
77 | #define PORT_E GPIO_PE0 | ||
78 | |||
79 | #endif /* _MACH_GPIO_H_ */ | ||
diff --git a/arch/blackfin/mach-bf561/include/mach/gpio.h b/arch/blackfin/mach-bf561/include/mach/gpio.h new file mode 100644 index 000000000000..7882f79e1ade --- /dev/null +++ b/arch/blackfin/mach-bf561/include/mach/gpio.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf561/include/mach/gpio.h | ||
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
4 | * | ||
5 | * Copyright (C) 2008 Analog Devices Inc. | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #ifndef _MACH_GPIO_H_ | ||
11 | #define _MACH_GPIO_H_ | ||
12 | |||
13 | #define MAX_BLACKFIN_GPIOS 48 | ||
14 | |||
15 | #define GPIO_PF0 0 | ||
16 | #define GPIO_PF1 1 | ||
17 | #define GPIO_PF2 2 | ||
18 | #define GPIO_PF3 3 | ||
19 | #define GPIO_PF4 4 | ||
20 | #define GPIO_PF5 5 | ||
21 | #define GPIO_PF6 6 | ||
22 | #define GPIO_PF7 7 | ||
23 | #define GPIO_PF8 8 | ||
24 | #define GPIO_PF9 9 | ||
25 | #define GPIO_PF10 10 | ||
26 | #define GPIO_PF11 11 | ||
27 | #define GPIO_PF12 12 | ||
28 | #define GPIO_PF13 13 | ||
29 | #define GPIO_PF14 14 | ||
30 | #define GPIO_PF15 15 | ||
31 | #define GPIO_PF16 16 | ||
32 | #define GPIO_PF17 17 | ||
33 | #define GPIO_PF18 18 | ||
34 | #define GPIO_PF19 19 | ||
35 | #define GPIO_PF20 20 | ||
36 | #define GPIO_PF21 21 | ||
37 | #define GPIO_PF22 22 | ||
38 | #define GPIO_PF23 23 | ||
39 | #define GPIO_PF24 24 | ||
40 | #define GPIO_PF25 25 | ||
41 | #define GPIO_PF26 26 | ||
42 | #define GPIO_PF27 27 | ||
43 | #define GPIO_PF28 28 | ||
44 | #define GPIO_PF29 29 | ||
45 | #define GPIO_PF30 30 | ||
46 | #define GPIO_PF31 31 | ||
47 | #define GPIO_PF32 32 | ||
48 | #define GPIO_PF33 33 | ||
49 | #define GPIO_PF34 34 | ||
50 | #define GPIO_PF35 35 | ||
51 | #define GPIO_PF36 36 | ||
52 | #define GPIO_PF37 37 | ||
53 | #define GPIO_PF38 38 | ||
54 | #define GPIO_PF39 39 | ||
55 | #define GPIO_PF40 40 | ||
56 | #define GPIO_PF41 41 | ||
57 | #define GPIO_PF42 42 | ||
58 | #define GPIO_PF43 43 | ||
59 | #define GPIO_PF44 44 | ||
60 | #define GPIO_PF45 45 | ||
61 | #define GPIO_PF46 46 | ||
62 | #define GPIO_PF47 47 | ||
63 | |||
64 | #define PORT_FIO0 GPIO_0 | ||
65 | #define PORT_FIO1 GPIO_16 | ||
66 | #define PORT_FIO2 GPIO_32 | ||
67 | |||
68 | #endif /* _MACH_GPIO_H_ */ | ||