diff options
Diffstat (limited to 'drivers/gpio')
32 files changed, 50 insertions, 7 deletions
diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c index 9d293b6994..d0849c85c3 100644 --- a/drivers/gpio/adi_gpio2.c +++ b/drivers/gpio/adi_gpio2.c @@ -9,6 +9,7 @@ #include <common.h> #include <malloc.h> +#include <linux/bug.h> #include <linux/errno.h> #include <asm/gpio.h> diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index a3f5e7a2e0..455944d547 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -12,6 +12,7 @@ #include <malloc.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> +#include <linux/bitops.h> #include <mach/gpio.h> #include <mach/atmel_pio4.h> diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c index 71a978cf40..5da11d988e 100644 --- a/drivers/gpio/bcm6345_gpio.c +++ b/drivers/gpio/bcm6345_gpio.c @@ -12,6 +12,7 @@ #include <errno.h> #include <asm/gpio.h> #include <asm/io.h> +#include <linux/bitops.h> struct bcm6345_gpio_priv { void __iomem *reg_dirout; diff --git a/drivers/gpio/cortina_gpio.c b/drivers/gpio/cortina_gpio.c index e2374ce1e7..055907c1a1 100644 --- a/drivers/gpio/cortina_gpio.c +++ b/drivers/gpio/cortina_gpio.c @@ -7,8 +7,10 @@ #include <common.h> #include <dm.h> +#include <log.h> #include <asm/io.h> #include <asm/gpio.h> +#include <linux/bitops.h> #include <linux/compat.h> #include <linux/compiler.h> diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index e3439eebb5..e5e3518194 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <log.h> #include <malloc.h> #include <asm/arch/gpio.h> #include <asm/gpio.h> @@ -18,6 +19,7 @@ #include <dm/root.h> #include <errno.h> #include <reset.h> +#include <linux/bitops.h> #define GPIO_SWPORT_DR(p) (0x00 + (p) * 0xc) #define GPIO_SWPORT_DDR(p) (0x04 + (p) * 0xc) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 9dc4cd6042..c49a041059 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -12,6 +12,7 @@ #include <errno.h> #include <asm/gpio.h> #include <asm/io.h> +#include <linux/bitops.h> #include "../pinctrl/renesas/sh_pfc.h" #define GPIO_IOINTSEL 0x00 /* General IO/Interrupt Switching Register */ diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c index ce2453e2ba..21a87d645c 100644 --- a/drivers/gpio/gpio-rza1.c +++ b/drivers/gpio/gpio-rza1.c @@ -9,6 +9,7 @@ #include <errno.h> #include <asm/gpio.h> #include <asm/io.h> +#include <linux/bitops.h> #define P(bank) (0x0000 + (bank) * 4) #define PSR(bank) (0x0100 + (bank) * 4) diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index d3cea11f76..9eeab22eef 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -5,7 +5,7 @@ #include <common.h> #include <dm.h> -#include <dm/device_compat.h> +#include <log.h> #include <dm/device-internal.h> #include <dm/lists.h> #include <dm/uclass-internal.h> @@ -14,6 +14,7 @@ #include <fdtdec.h> #include <malloc.h> #include <asm/gpio.h> +#include <dm/device_compat.h> #include <linux/bug.h> #include <linux/ctype.h> diff --git a/drivers/gpio/hi6220_gpio.c b/drivers/gpio/hi6220_gpio.c index 97a0417891..95de2ae366 100644 --- a/drivers/gpio/hi6220_gpio.c +++ b/drivers/gpio/hi6220_gpio.c @@ -9,6 +9,7 @@ #include <asm/gpio.h> #include <asm/io.h> #include <errno.h> +#include <linux/bitops.h> static int hi6220_gpio_direction_input(struct udevice *dev, unsigned int gpio) { diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c index 800027f18e..d9df804f63 100644 --- a/drivers/gpio/hsdk-creg-gpio.c +++ b/drivers/gpio/hsdk-creg-gpio.c @@ -9,11 +9,13 @@ * warranty of any kind, whether express or implied. */ +#include <log.h> #include <asm-generic/gpio.h> #include <asm/io.h> #include <common.h> #include <dm.h> #include <errno.h> +#include <linux/bitops.h> #include <linux/printk.h> #define DRV_NAME "gpio_creg" diff --git a/drivers/gpio/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c index 37299ecd0d..95f8b2ba6c 100644 --- a/drivers/gpio/intel_broadwell_gpio.c +++ b/drivers/gpio/intel_broadwell_gpio.c @@ -7,6 +7,7 @@ #include <dm.h> #include <errno.h> #include <fdtdec.h> +#include <log.h> #include <pch.h> #include <pci.h> #include <syscon.h> diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c index 67b8b80b9d..711fea1b58 100644 --- a/drivers/gpio/intel_gpio.c +++ b/drivers/gpio/intel_gpio.c @@ -7,6 +7,7 @@ #include <dm.h> #include <errno.h> #include <fdtdec.h> +#include <log.h> #include <p2sb.h> #include <pch.h> #include <pci.h> diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c index ad08b3aa79..73d98fde55 100644 --- a/drivers/gpio/intel_ich6_gpio.c +++ b/drivers/gpio/intel_ich6_gpio.c @@ -30,6 +30,7 @@ #include <dm.h> #include <errno.h> #include <fdtdec.h> +#include <log.h> #include <pch.h> #include <pci.h> #include <asm/cpu.h> diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c index c65ca81728..780d77b2f8 100644 --- a/drivers/gpio/mscc_sgpio.c +++ b/drivers/gpio/mscc_sgpio.c @@ -9,11 +9,13 @@ #include <common.h> #include <dm.h> +#include <log.h> #include <asm/gpio.h> #include <asm/io.h> #include <errno.h> #include <clk.h> #include <dm/device_compat.h> +#include <linux/bitops.h> #include <linux/err.h> #define MSCC_SGPIOS_PER_BANK 32 diff --git a/drivers/gpio/mt7621_gpio.c b/drivers/gpio/mt7621_gpio.c index 54d313d6f1..612413e17b 100644 --- a/drivers/gpio/mt7621_gpio.c +++ b/drivers/gpio/mt7621_gpio.c @@ -12,6 +12,7 @@ #include <errno.h> #include <fdtdec.h> #include <malloc.h> +#include <linux/bitops.h> #include <linux/io.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c index e8b1c5965c..770cbf6b60 100644 --- a/drivers/gpio/mvebu_gpio.c +++ b/drivers/gpio/mvebu_gpio.c @@ -8,6 +8,7 @@ #include <asm/gpio.h> #include <asm/io.h> #include <errno.h> +#include <linux/bitops.h> #define MVEBU_GPIOS_PER_BANK 32 diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index 405e9ac135..815339a156 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -7,7 +7,9 @@ */ #include <common.h> +#include <log.h> #include <malloc.h> +#include <linux/bitops.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/iomux.h> diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index fda8054d53..4ab8cee2d1 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <command.h> #include <i2c.h> #include <pca953x.h> @@ -192,7 +193,7 @@ static int pca953x_info(uint8_t chip) return 0; } -static cmd_tbl_t cmd_pca953x[] = { +static struct cmd_tbl cmd_pca953x[] = { U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCA953X_CMD_DEVICE, "", ""), U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCA953X_CMD_OUTPUT, "", ""), U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCA953X_CMD_INPUT, "", ""), @@ -200,13 +201,14 @@ static cmd_tbl_t cmd_pca953x[] = { U_BOOT_CMD_MKENT(info, 2, 0, (void *)PCA953X_CMD_INFO, "", ""), }; -static int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR; int ret = CMD_RET_USAGE, val; ulong ul_arg2 = 0; ulong ul_arg3 = 0; - cmd_tbl_t *c; + struct cmd_tbl *c; c = find_cmd_tbl(argv[1], cmd_pca953x, ARRAY_SIZE(cmd_pca953x)); diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index d06b834a3b..fd17d1a591 100644 --- a/drivers/gpio/pca953x_gpio.c +++ b/drivers/gpio/pca953x_gpio.c @@ -28,6 +28,7 @@ #include <asm/io.h> #include <dm/device_compat.h> #include <dt-bindings/gpio/gpio.h> +#include <linux/bitops.h> #define PCA953X_INPUT 0 #define PCA953X_OUTPUT 1 diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c index e93f640488..1b9a18fe5d 100644 --- a/drivers/gpio/pcf8575_gpio.c +++ b/drivers/gpio/pcf8575_gpio.c @@ -26,7 +26,9 @@ #include <common.h> #include <dm.h> #include <i2c.h> +#include <log.h> #include <asm-generic/gpio.h> +#include <linux/bitops.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/gpio/pic32_gpio.c b/drivers/gpio/pic32_gpio.c index d8789e7607..bb1ad256fa 100644 --- a/drivers/gpio/pic32_gpio.c +++ b/drivers/gpio/pic32_gpio.c @@ -10,6 +10,7 @@ #include <malloc.h> #include <asm/io.h> #include <asm/gpio.h> +#include <linux/bitops.h> #include <linux/compat.h> #include <mach/pic32.h> diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c index 74a773c099..51df5367ea 100644 --- a/drivers/gpio/pm8916_gpio.c +++ b/drivers/gpio/pm8916_gpio.c @@ -7,6 +7,7 @@ #include <common.h> #include <dm.h> +#include <log.h> #include <power/pmic.h> #include <spmi/spmi.h> #include <asm/io.h> diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index e4b5383d0f..258f13395d 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -8,6 +8,7 @@ #include <dm.h> #include <errno.h> #include <fdtdec.h> +#include <log.h> #include <malloc.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c index 9549c74c2b..98b7fa4bb3 100644 --- a/drivers/gpio/sandbox.c +++ b/drivers/gpio/sandbox.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> #include <fdtdec.h> +#include <log.h> #include <malloc.h> #include <asm/gpio.h> #include <dm/device_compat.h> diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c index 6320a6280d..0653171af4 100644 --- a/drivers/gpio/sh_pfc.c +++ b/drivers/gpio/sh_pfc.c @@ -10,10 +10,13 @@ */ #include <common.h> +#include <log.h> #include <malloc.h> #include <asm/bitops.h> #include <asm/io.h> #include <sh_pfc.h> +#include <linux/bitops.h> +#include <linux/bug.h> static struct pinmux_info *gpioc; diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c index 76d5a1d34e..24da3b3c23 100644 --- a/drivers/gpio/sifive-gpio.c +++ b/drivers/gpio/sifive-gpio.c @@ -11,6 +11,7 @@ #include <asm/io.h> #include <errno.h> #include <asm/gpio.h> +#include <linux/bitops.h> static int sifive_gpio_probe(struct udevice *dev) { diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c index 37a8cfa47a..4f710b6b6a 100644 --- a/drivers/gpio/stm32_gpio.c +++ b/drivers/gpio/stm32_gpio.c @@ -8,11 +8,13 @@ #include <clk.h> #include <dm.h> #include <fdtdec.h> +#include <log.h> #include <asm/arch/gpio.h> #include <asm/arch/stm32.h> #include <asm/gpio.h> #include <asm/io.h> #include <dm/device_compat.h> +#include <linux/bitops.h> #include <linux/errno.h> #include <linux/io.h> diff --git a/drivers/gpio/tca642x.c b/drivers/gpio/tca642x.c index 730460a999..463cfe879a 100644 --- a/drivers/gpio/tca642x.c +++ b/drivers/gpio/tca642x.c @@ -21,6 +21,7 @@ */ #include <common.h> +#include <command.h> #include <i2c.h> #include <tca642x.h> @@ -212,7 +213,7 @@ static int tca642x_info(uchar chip) return 0; } -static cmd_tbl_t cmd_tca642x[] = { +static struct cmd_tbl cmd_tca642x[] = { U_BOOT_CMD_MKENT(device, 3, 0, (void *)TCA642X_CMD_DEVICE, "", ""), U_BOOT_CMD_MKENT(output, 4, 0, (void *)TCA642X_CMD_OUTPUT, "", ""), U_BOOT_CMD_MKENT(input, 3, 0, (void *)TCA642X_CMD_INPUT, "", ""), @@ -220,7 +221,8 @@ static cmd_tbl_t cmd_tca642x[] = { U_BOOT_CMD_MKENT(info, 2, 0, (void *)TCA642X_CMD_INFO, "", ""), }; -static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_tca642x(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { static uchar chip = CONFIG_SYS_I2C_TCA642X_ADDR; int ret = CMD_RET_USAGE, val; @@ -228,7 +230,7 @@ static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) uint8_t bank_shift; ulong ul_arg2 = 0; ulong ul_arg3 = 0; - cmd_tbl_t *c; + struct cmd_tbl *c; c = find_cmd_tbl(argv[1], cmd_tca642x, ARRAY_SIZE(cmd_tca642x)); diff --git a/drivers/gpio/tegra186_gpio_priv.h b/drivers/gpio/tegra186_gpio_priv.h index ac8df27c46..3e686beedc 100644 --- a/drivers/gpio/tegra186_gpio_priv.h +++ b/drivers/gpio/tegra186_gpio_priv.h @@ -10,6 +10,7 @@ * For each GPIO, there are a set of registers than affect it, all packed * back-to-back. */ +#include <linux/bitops.h> #define TEGRA186_GPIO_ENABLE_CONFIG 0x00 #define TEGRA186_GPIO_ENABLE_CONFIG_ENABLE BIT(0) #define TEGRA186_GPIO_ENABLE_CONFIG_OUT BIT(1) diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index a730f5c4fe..912577a571 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -12,6 +12,7 @@ #include <common.h> #include <dm.h> +#include <log.h> #include <malloc.h> #include <errno.h> #include <fdtdec.h> diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c index 2389abee37..014f120d60 100644 --- a/drivers/gpio/xilinx_gpio.c +++ b/drivers/gpio/xilinx_gpio.c @@ -5,6 +5,7 @@ #include <common.h> #include <errno.h> +#include <log.h> #include <malloc.h> #include <linux/list.h> #include <asm/io.h> diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c index fe3b2c3b1a..d0e90b8d63 100644 --- a/drivers/gpio/zynq_gpio.c +++ b/drivers/gpio/zynq_gpio.c @@ -11,6 +11,7 @@ #include <common.h> #include <asm/gpio.h> #include <asm/io.h> +#include <linux/bitops.h> #include <linux/errno.h> #include <dm.h> #include <fdtdec.h> |