Stefan Roese | ad38e5d | 2012-02-14 14:01:36 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 Stefan Roese <sr@denx.de> |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | ad38e5d | 2012-02-14 14:01:36 +0100 | [diff] [blame] | 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 */ |