Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefan Roese | ad38e5d | 2012-02-14 14:01:36 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2012 Stefan Roese <sr@denx.de> |
Stefan Roese | ad38e5d | 2012-02-14 14:01:36 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | |
| 7 | #ifndef __ASM_ARCH_SPEAR_GPIO_H |
| 8 | #define __ASM_ARCH_SPEAR_GPIO_H |
| 9 | |
| 10 | enum gpio_direction { |
| 11 | GPIO_DIRECTION_IN, |
| 12 | GPIO_DIRECTION_OUT, |
| 13 | }; |
| 14 | |
| 15 | struct gpio_regs { |
| 16 | u32 gpiodata[0x100]; /* 0x000 ... 0x3fc */ |
| 17 | u32 gpiodir; /* 0x400 */ |
| 18 | }; |
| 19 | |
| 20 | #define SPEAR_GPIO_COUNT 8 |
| 21 | #define DATA_REG_ADDR(gpio) (1 << (gpio + 2)) |
| 22 | |
| 23 | #endif /* __ASM_ARCH_SPEAR_GPIO_H */ |