diff options
Diffstat (limited to 'arch/arm/include/asm/arch-tegra2/gpio.h')
-rw-r--r-- | arch/arm/include/asm/arch-tegra2/gpio.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/include/asm/arch-tegra2/gpio.h b/arch/arm/include/asm/arch-tegra2/gpio.h index 6078270df0..00d543550c 100644 --- a/arch/arm/include/asm/arch-tegra2/gpio.h +++ b/arch/arm/include/asm/arch-tegra2/gpio.h @@ -24,6 +24,27 @@ #define CONFIG_TEGRA_MAX_GPIO_PORT 27 -#include "asm/arch-tegra/gpio.h" +#include <asm/arch-tegra/gpio.h> + +/* + * The Tegra 2x GPIO controller has 222 GPIOs arranged in 8 banks of 4 ports, + * each with 8 GPIOs. + */ + +/* GPIO Controller registers for a single bank */ +struct gpio_ctlr_bank { + uint gpio_config[TEGRA_GPIO_PORTS]; + uint gpio_dir_out[TEGRA_GPIO_PORTS]; + uint gpio_out[TEGRA_GPIO_PORTS]; + uint gpio_in[TEGRA_GPIO_PORTS]; + uint gpio_int_status[TEGRA_GPIO_PORTS]; + uint gpio_int_enable[TEGRA_GPIO_PORTS]; + uint gpio_int_level[TEGRA_GPIO_PORTS]; + uint gpio_int_clear[TEGRA_GPIO_PORTS]; +}; + +struct gpio_ctlr { + struct gpio_ctlr_bank gpio_bank[TEGRA_GPIO_BANKS]; +}; #endif /* TEGRA2_GPIO_H_ */ |