]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/include/asm/arch-spear/gpio.h
Add GPL-2.0+ SPDX-License-Identifier to source files
[karo-tx-uboot.git] / arch / arm / include / asm / arch-spear / gpio.h
1 /*
2  * Copyright (C) 2012 Stefan Roese <sr@denx.de>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7
8 #ifndef __ASM_ARCH_SPEAR_GPIO_H
9 #define __ASM_ARCH_SPEAR_GPIO_H
10
11 enum gpio_direction {
12         GPIO_DIRECTION_IN,
13         GPIO_DIRECTION_OUT,
14 };
15
16 struct gpio_regs {
17         u32 gpiodata[0x100];    /* 0x000 ... 0x3fc */
18         u32 gpiodir;            /* 0x400 */
19 };
20
21 #define SPEAR_GPIO_COUNT                8
22 #define DATA_REG_ADDR(gpio)             (1 << (gpio + 2))
23
24 #endif  /* __ASM_ARCH_SPEAR_GPIO_H */