Merge branch 'topic/quirk-cleanup' into for-linus
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / blackfin / mach-bf548 / include / mach / gpio.h
1 /*
2 * File: include/asm-blackfin/mach-bf548/gpio.h
3 * Based on:
4 * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30
31
32 #define GPIO_PA0 0
33 #define GPIO_PA1 1
34 #define GPIO_PA2 2
35 #define GPIO_PA3 3
36 #define GPIO_PA4 4
37 #define GPIO_PA5 5
38 #define GPIO_PA6 6
39 #define GPIO_PA7 7
40 #define GPIO_PA8 8
41 #define GPIO_PA9 9
42 #define GPIO_PA10 10
43 #define GPIO_PA11 11
44 #define GPIO_PA12 12
45 #define GPIO_PA13 13
46 #define GPIO_PA14 14
47 #define GPIO_PA15 15
48 #define GPIO_PB0 16
49 #define GPIO_PB1 17
50 #define GPIO_PB2 18
51 #define GPIO_PB3 19
52 #define GPIO_PB4 20
53 #define GPIO_PB5 21
54 #define GPIO_PB6 22
55 #define GPIO_PB7 23
56 #define GPIO_PB8 24
57 #define GPIO_PB9 25
58 #define GPIO_PB10 26
59 #define GPIO_PB11 27
60 #define GPIO_PB12 28
61 #define GPIO_PB13 29
62 #define GPIO_PB14 30
63 #define GPIO_PB15 31 /* N/A */
64 #define GPIO_PC0 32
65 #define GPIO_PC1 33
66 #define GPIO_PC2 34
67 #define GPIO_PC3 35
68 #define GPIO_PC4 36
69 #define GPIO_PC5 37
70 #define GPIO_PC6 38
71 #define GPIO_PC7 39
72 #define GPIO_PC8 40
73 #define GPIO_PC9 41
74 #define GPIO_PC10 42
75 #define GPIO_PC11 43
76 #define GPIO_PC12 44
77 #define GPIO_PC13 45
78 #define GPIO_PC14 46 /* N/A */
79 #define GPIO_PC15 47 /* N/A */
80 #define GPIO_PD0 48
81 #define GPIO_PD1 49
82 #define GPIO_PD2 50
83 #define GPIO_PD3 51
84 #define GPIO_PD4 52
85 #define GPIO_PD5 53
86 #define GPIO_PD6 54
87 #define GPIO_PD7 55
88 #define GPIO_PD8 56
89 #define GPIO_PD9 57
90 #define GPIO_PD10 58
91 #define GPIO_PD11 59
92 #define GPIO_PD12 60
93 #define GPIO_PD13 61
94 #define GPIO_PD14 62
95 #define GPIO_PD15 63
96 #define GPIO_PE0 64
97 #define GPIO_PE1 65
98 #define GPIO_PE2 66
99 #define GPIO_PE3 67
100 #define GPIO_PE4 68
101 #define GPIO_PE5 69
102 #define GPIO_PE6 70
103 #define GPIO_PE7 71
104 #define GPIO_PE8 72
105 #define GPIO_PE9 73
106 #define GPIO_PE10 74
107 #define GPIO_PE11 75
108 #define GPIO_PE12 76
109 #define GPIO_PE13 77
110 #define GPIO_PE14 78
111 #define GPIO_PE15 79
112 #define GPIO_PF0 80
113 #define GPIO_PF1 81
114 #define GPIO_PF2 82
115 #define GPIO_PF3 83
116 #define GPIO_PF4 84
117 #define GPIO_PF5 85
118 #define GPIO_PF6 86
119 #define GPIO_PF7 87
120 #define GPIO_PF8 88
121 #define GPIO_PF9 89
122 #define GPIO_PF10 90
123 #define GPIO_PF11 91
124 #define GPIO_PF12 92
125 #define GPIO_PF13 93
126 #define GPIO_PF14 94
127 #define GPIO_PF15 95
128 #define GPIO_PG0 96
129 #define GPIO_PG1 97
130 #define GPIO_PG2 98
131 #define GPIO_PG3 99
132 #define GPIO_PG4 100
133 #define GPIO_PG5 101
134 #define GPIO_PG6 102
135 #define GPIO_PG7 103
136 #define GPIO_PG8 104
137 #define GPIO_PG9 105
138 #define GPIO_PG10 106
139 #define GPIO_PG11 107
140 #define GPIO_PG12 108
141 #define GPIO_PG13 109
142 #define GPIO_PG14 110
143 #define GPIO_PG15 111
144 #define GPIO_PH0 112
145 #define GPIO_PH1 113
146 #define GPIO_PH2 114
147 #define GPIO_PH3 115
148 #define GPIO_PH4 116
149 #define GPIO_PH5 117
150 #define GPIO_PH6 118
151 #define GPIO_PH7 119
152 #define GPIO_PH8 120
153 #define GPIO_PH9 121
154 #define GPIO_PH10 122
155 #define GPIO_PH11 123
156 #define GPIO_PH12 124
157 #define GPIO_PH13 125
158 #define GPIO_PH14 126 /* N/A */
159 #define GPIO_PH15 127 /* N/A */
160 #define GPIO_PI0 128
161 #define GPIO_PI1 129
162 #define GPIO_PI2 130
163 #define GPIO_PI3 131
164 #define GPIO_PI4 132
165 #define GPIO_PI5 133
166 #define GPIO_PI6 134
167 #define GPIO_PI7 135
168 #define GPIO_PI8 136
169 #define GPIO_PI9 137
170 #define GPIO_PI10 138
171 #define GPIO_PI11 139
172 #define GPIO_PI12 140
173 #define GPIO_PI13 141
174 #define GPIO_PI14 142
175 #define GPIO_PI15 143
176 #define GPIO_PJ0 144
177 #define GPIO_PJ1 145
178 #define GPIO_PJ2 146
179 #define GPIO_PJ3 147
180 #define GPIO_PJ4 148
181 #define GPIO_PJ5 149
182 #define GPIO_PJ6 150
183 #define GPIO_PJ7 151
184 #define GPIO_PJ8 152
185 #define GPIO_PJ9 153
186 #define GPIO_PJ10 154
187 #define GPIO_PJ11 155
188 #define GPIO_PJ12 156
189 #define GPIO_PJ13 157
190 #define GPIO_PJ14 158 /* N/A */
191 #define GPIO_PJ15 159 /* N/A */
192
193 #define MAX_BLACKFIN_GPIOS 160
194
195 struct gpio_port_t {
196 unsigned short port_fer;
197 unsigned short dummy1;
198 unsigned short data;
199 unsigned short dummy2;
200 unsigned short data_set;
201 unsigned short dummy3;
202 unsigned short data_clear;
203 unsigned short dummy4;
204 unsigned short dir_set;
205 unsigned short dummy5;
206 unsigned short dir_clear;
207 unsigned short dummy6;
208 unsigned short inen;
209 unsigned short dummy7;
210 unsigned int port_mux;
211 };
212
213 struct gpio_port_s {
214 unsigned short fer;
215 unsigned short data;
216 unsigned short dir;
217 unsigned short inen;
218 unsigned int mux;
219 };