diff options
Diffstat (limited to 'roms/u-boot/arch/arm/include/asm/arch-spear/gpio.h')
-rw-r--r-- | roms/u-boot/arch/arm/include/asm/arch-spear/gpio.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/include/asm/arch-spear/gpio.h b/roms/u-boot/arch/arm/include/asm/arch-spear/gpio.h new file mode 100644 index 00000000..54e6b5bf --- /dev/null +++ b/roms/u-boot/arch/arm/include/asm/arch-spear/gpio.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2012 Stefan Roese <sr@denx.de> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + + +#ifndef __ASM_ARCH_SPEAR_GPIO_H +#define __ASM_ARCH_SPEAR_GPIO_H + +enum gpio_direction { + GPIO_DIRECTION_IN, + GPIO_DIRECTION_OUT, +}; + +struct gpio_regs { + u32 gpiodata[0x100]; /* 0x000 ... 0x3fc */ + u32 gpiodir; /* 0x400 */ +}; + +#define SPEAR_GPIO_COUNT 8 +#define DATA_REG_ADDR(gpio) (1 << (gpio + 2)) + +#endif /* __ASM_ARCH_SPEAR_GPIO_H */ |