diff options
Diffstat (limited to 'include/asm-blackfin/gpio.h')
-rw-r--r-- | include/asm-blackfin/gpio.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index d98d77ad71f7..7480cfa7e2d6 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
@@ -204,8 +204,62 @@ | |||
204 | 204 | ||
205 | #endif | 205 | #endif |
206 | 206 | ||
207 | #ifdef BF548_FAMILY | ||
208 | #include <asm-blackfin/mach-bf548/gpio.h> | ||
209 | #endif | ||
210 | |||
207 | #ifdef BF561_FAMILY | 211 | #ifdef BF561_FAMILY |
208 | #define MAX_BLACKFIN_GPIOS 48 | 212 | #define MAX_BLACKFIN_GPIOS 48 |
213 | |||
214 | #define GPIO_PF0 0 | ||
215 | #define GPIO_PF1 1 | ||
216 | #define GPIO_PF2 2 | ||
217 | #define GPIO_PF3 3 | ||
218 | #define GPIO_PF4 4 | ||
219 | #define GPIO_PF5 5 | ||
220 | #define GPIO_PF6 6 | ||
221 | #define GPIO_PF7 7 | ||
222 | #define GPIO_PF8 8 | ||
223 | #define GPIO_PF9 9 | ||
224 | #define GPIO_PF10 10 | ||
225 | #define GPIO_PF11 11 | ||
226 | #define GPIO_PF12 12 | ||
227 | #define GPIO_PF13 13 | ||
228 | #define GPIO_PF14 14 | ||
229 | #define GPIO_PF15 15 | ||
230 | #define GPIO_PF16 16 | ||
231 | #define GPIO_PF17 17 | ||
232 | #define GPIO_PF18 18 | ||
233 | #define GPIO_PF19 19 | ||
234 | #define GPIO_PF20 20 | ||
235 | #define GPIO_PF21 21 | ||
236 | #define GPIO_PF22 22 | ||
237 | #define GPIO_PF23 23 | ||
238 | #define GPIO_PF24 24 | ||
239 | #define GPIO_PF25 25 | ||
240 | #define GPIO_PF26 26 | ||
241 | #define GPIO_PF27 27 | ||
242 | #define GPIO_PF28 28 | ||
243 | #define GPIO_PF29 29 | ||
244 | #define GPIO_PF30 30 | ||
245 | #define GPIO_PF31 31 | ||
246 | #define GPIO_PF32 32 | ||
247 | #define GPIO_PF33 33 | ||
248 | #define GPIO_PF34 34 | ||
249 | #define GPIO_PF35 35 | ||
250 | #define GPIO_PF36 36 | ||
251 | #define GPIO_PF37 37 | ||
252 | #define GPIO_PF38 38 | ||
253 | #define GPIO_PF39 39 | ||
254 | #define GPIO_PF40 40 | ||
255 | #define GPIO_PF41 41 | ||
256 | #define GPIO_PF42 42 | ||
257 | #define GPIO_PF43 43 | ||
258 | #define GPIO_PF44 44 | ||
259 | #define GPIO_PF45 45 | ||
260 | #define GPIO_PF46 46 | ||
261 | #define GPIO_PF47 47 | ||
262 | |||
209 | #define PORT_FIO0 GPIO_0 | 263 | #define PORT_FIO0 GPIO_0 |
210 | #define PORT_FIO1 GPIO_16 | 264 | #define PORT_FIO1 GPIO_16 |
211 | #define PORT_FIO2 GPIO_32 | 265 | #define PORT_FIO2 GPIO_32 |
@@ -230,6 +284,7 @@ | |||
230 | * MODIFICATION HISTORY : | 284 | * MODIFICATION HISTORY : |
231 | **************************************************************/ | 285 | **************************************************************/ |
232 | 286 | ||
287 | #ifndef BF548_FAMILY | ||
233 | void set_gpio_dir(unsigned short, unsigned short); | 288 | void set_gpio_dir(unsigned short, unsigned short); |
234 | void set_gpio_inen(unsigned short, unsigned short); | 289 | void set_gpio_inen(unsigned short, unsigned short); |
235 | void set_gpio_polar(unsigned short, unsigned short); | 290 | void set_gpio_polar(unsigned short, unsigned short); |
@@ -299,6 +354,7 @@ struct gpio_port_t { | |||
299 | unsigned short dummy16; | 354 | unsigned short dummy16; |
300 | unsigned short inen; | 355 | unsigned short inen; |
301 | }; | 356 | }; |
357 | #endif | ||
302 | 358 | ||
303 | #ifdef CONFIG_PM | 359 | #ifdef CONFIG_PM |
304 | #define PM_WAKE_RISING 0x1 | 360 | #define PM_WAKE_RISING 0x1 |
@@ -357,8 +413,10 @@ void gpio_free(unsigned short); | |||
357 | void gpio_set_value(unsigned short gpio, unsigned short arg); | 413 | void gpio_set_value(unsigned short gpio, unsigned short arg); |
358 | unsigned short gpio_get_value(unsigned short gpio); | 414 | unsigned short gpio_get_value(unsigned short gpio); |
359 | 415 | ||
416 | #ifndef BF548_FAMILY | ||
360 | #define gpio_get_value(gpio) get_gpio_data(gpio) | 417 | #define gpio_get_value(gpio) get_gpio_data(gpio) |
361 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) | 418 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) |
419 | #endif | ||
362 | 420 | ||
363 | void gpio_direction_input(unsigned short gpio); | 421 | void gpio_direction_input(unsigned short gpio); |
364 | void gpio_direction_output(unsigned short gpio); | 422 | void gpio_direction_output(unsigned short gpio); |