summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorLaurence Withers <lwithers@guralp.com>2011-07-18 09:26:01 -0400
committerU-Boot <uboot@aari01-12.(none)>2011-08-03 12:49:19 +0200
commitf517afd5df152a266970a3be10fdf9fbf2a11280 (patch)
treee4f8c87cf51aa368e52345c78e6c431867781430 /arch/arm/include
parent0bf98f1d13224b0c7a18c72f4aaa6a04df982a47 (diff)
downloadtalos-obmc-uboot-f517afd5df152a266970a3be10fdf9fbf2a11280.tar.gz
talos-obmc-uboot-f517afd5df152a266970a3be10fdf9fbf2a11280.zip
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')
-rw-r--r--arch/arm/include/asm/arch-davinci/gpio.h8
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 1be2ac2660..29dcccf195 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
OpenPOWER on IntegriCloud