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>
This commit is contained in:
Adam Ford
2018-06-10 22:25:57 -05:00
committed by Tom Rini
parent 92a14a4772
commit 8e51c0f254
5 changed files with 188 additions and 29 deletions

View File

@@ -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