Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Sandeep Paulraj | 7f507e8 | 2009-09-29 10:02:38 -0400 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2009 Texas Instruments Incorporated |
Sandeep Paulraj | 7f507e8 | 2009-09-29 10:02:38 -0400 | [diff] [blame] | 4 | */ |
| 5 | #ifndef _GPIO_DEFS_H_ |
| 6 | #define _GPIO_DEFS_H_ |
| 7 | |
Ajay Kumar Gupta | bae61dd | 2009-12-22 10:56:12 +0530 | [diff] [blame] | 8 | #define DAVINCI_GPIO_BINTEN 0x01E26008 |
| 9 | #define DAVINCI_GPIO_BANK01 0x01E26010 |
| 10 | #define DAVINCI_GPIO_BANK23 0x01E26038 |
| 11 | #define DAVINCI_GPIO_BANK45 0x01E26060 |
| 12 | #define DAVINCI_GPIO_BANK67 0x01E26088 |
Heiko Schocher | 8d510c5 | 2011-09-14 19:59:35 +0000 | [diff] [blame] | 13 | #define DAVINCI_GPIO_BANK8 0x01E260B0 |
Ajay Kumar Gupta | bae61dd | 2009-12-22 10:56:12 +0530 | [diff] [blame] | 14 | |
Ajay Kumar Gupta | bae61dd | 2009-12-22 10:56:12 +0530 | [diff] [blame] | 15 | #define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01) |
| 16 | #define davinci_gpio_bank23 ((struct davinci_gpio *)DAVINCI_GPIO_BANK23) |
| 17 | #define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45) |
| 18 | #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) |
Heiko Schocher | 8d510c5 | 2011-09-14 19:59:35 +0000 | [diff] [blame] | 19 | #define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8) |
Ajay Kumar Gupta | bae61dd | 2009-12-22 10:56:12 +0530 | [diff] [blame] | 20 | |
Adam Ford | 9c286a7 | 2018-06-10 22:25:57 -0500 | [diff] [blame] | 21 | #ifndef CONFIG_DM_GPIO |
Laurence Withers | 3ffd968 | 2011-07-18 09:26:01 -0400 | [diff] [blame] | 22 | #define gpio_status() gpio_info() |
Adam Ford | 9c286a7 | 2018-06-10 22:25:57 -0500 | [diff] [blame] | 23 | #endif |
Laurence Withers | 3ffd968 | 2011-07-18 09:26:01 -0400 | [diff] [blame] | 24 | #define GPIO_NAME_SIZE 20 |
| 25 | #define MAX_NUM_GPIOS 144 |
| 26 | #define GPIO_BANK(gp) (davinci_gpio_bank01 + ((gp) >> 5)) |
Laurence Withers | 3ffd968 | 2011-07-18 09:26:01 -0400 | [diff] [blame] | 27 | |
| 28 | void gpio_info(void); |
| 29 | |
Sandeep Paulraj | 7f507e8 | 2009-09-29 10:02:38 -0400 | [diff] [blame] | 30 | #endif |