dm: gpio: Add DM compatibilty to GPIO driver for Davinci
Subsystems (4)
PATCH 1/1 dm: gpio: Add DM compatibilty to GPIO driver for Davinci
This adds DM compatibility for the davinici GPIO driver. Tested on da850-evm.
Signed-off-by Adam Ford <[email protected]>
arch/arm/mach-davinci/include/mach/gpio.h +13 -1
@@ -40,7 +40,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)
@@ -49,7 +49,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 */
@@ -64,4 +66,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
board/davinci/da8xxevm/da850evm.c +2 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <dm.h> #include <i2c.h> #include <net.h> #include <netdev.h>
@@ -24,6 +25,7 @@#include <linux/errno.h> #include <hwconfig.h> #include <asm/mach-types.h> +#include <asm/gpio.h> #ifdef CONFIG_MMC_DAVINCI #include <mmc.h>
configs/da850evm_defconfig +2 -1
@@ -20,14 +20,15 @@ CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot > " # CONFIG_CMD_IMLS is not set CONFIG_CRC32_VERIFY=y +# CONFIG_CMD_EEPROM is not set # CONFIG_CMD_FLASH is not set -# CONFIG_CMD_GPIO is not set # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MTDPARTS=y CONFIG_CMD_DIAG=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y +CONFIG_DM_GPIO=y CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
drivers/gpio/da8xx_gpio.c +189 -21
263 lines not on this page · raw message
include/configs/da850evm.h +1 -0
@@ -262,6 +262,7 @@#define CONFIG_ENV_SECT_SIZE (64 << 10)#endif +#define CONFIG_DA8XX_GPIO /* * U-Boot general configuration */
Signature · 1 line
2.7.4