diff options
author | Laurence Withers <lwithers@guralp.com> | 2011-07-18 09:26:01 -0400 |
---|---|---|
committer | U-Boot <uboot@aari01-12.(none)> | 2011-08-03 12:49:19 +0200 |
commit | f517afd5df152a266970a3be10fdf9fbf2a11280 (patch) | |
tree | e4f8c87cf51aa368e52345c78e6c431867781430 /arch/arm/include/asm | |
parent | 0bf98f1d13224b0c7a18c72f4aaa6a04df982a47 (diff) | |
download | u-boot-imx-f517afd5df152a266970a3be10fdf9fbf2a11280.zip u-boot-imx-f517afd5df152a266970a3be10fdf9fbf2a11280.tar.gz u-boot-imx-f517afd5df152a266970a3be10fdf9fbf2a11280.tar.bz2 |
DA8xx: add generic GPIO driver
Add a generic GPIO driver for the DaVinci DA8xx processors. It is turned
on by defining CONFIG_DA8XX_GPIO and fulfills the generic GPIO interface
specified in <asm/gpio.h> . The driver has support for both manipulating
GPIO pins as well as automatically configuring the pin multiplexor
registers to set the pin function to GPIO.
Signed-off-by: Laurence Withers <lwithers@guralp.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/arch-davinci/gpio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-davinci/gpio.h b/arch/arm/include/asm/arch-davinci/gpio.h index 1be2ac2..29dcccf 100644 --- a/arch/arm/include/asm/arch-davinci/gpio.h +++ b/arch/arm/include/asm/arch-davinci/gpio.h @@ -63,4 +63,12 @@ struct davinci_gpio_bank { #define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45) #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) +#define gpio_status() gpio_info() +#define GPIO_NAME_SIZE 20 +#define MAX_NUM_GPIOS 144 +#define GPIO_BANK(gp) (davinci_gpio_bank01 + ((gp) >> 5)) +#define GPIO_BIT(gp) ((gp) & 0x1F) + +void gpio_info(void); + #endif |