diff options
author | Adam Ford <aford173@gmail.com> | 2018-06-10 22:25:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-06-18 14:43:12 -0400 |
commit | 8e51c0f254063f4da2e91c2cf47fad37285be73d (patch) | |
tree | c8a503db39f05757259950adc3fc34887f1b50f6 /arch/arm/mach-davinci/include | |
parent | 92a14a4772ad5d809dbdaaae1812dd4757fece3c (diff) |
dm: gpio: Add DM compatibility to GPIO driver for Davinci
This adds DM_GPIO support for the davinici GPIO driver with
DT support.
Signed-off-by: Adam Ford <aford173@gmail.com>
Diffstat (limited to 'arch/arm/mach-davinci/include')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/gpio.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index f1d4d9e9e0..d4b25c3d60 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h @@ -39,7 +39,7 @@ struct davinci_gpio_bank { unsigned int irq_num; unsigned int irq_mask; unsigned long *in_use; - unsigned long base; + struct davinci_gpio *base; }; #define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01) @@ -48,7 +48,9 @@ struct davinci_gpio_bank { #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) #define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8) +#ifndef CONFIG_DM_GPIO #define gpio_status() gpio_info() +#endif #define GPIO_NAME_SIZE 20 #if defined(CONFIG_SOC_DM644X) /* GPIO0 to GPIO53, omit the V3.3 volts one */ @@ -63,4 +65,14 @@ struct davinci_gpio_bank { void gpio_info(void); +#ifdef CONFIG_DM_GPIO + +/* Information about a GPIO bank */ +struct davinci_gpio_platdata { + int bank_index; + ulong base; /* address of registers in physical memory */ + const char *port_name; +}; +#endif + #endif |