blob: 4c8c40b1c99764253eac25ffbd7dd34864ee9713 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefan Roesead38e5d2012-02-14 14:01:36 +01002/*
3 * Copyright (C) 2012 Stefan Roese <sr@denx.de>
Stefan Roesead38e5d2012-02-14 14:01:36 +01004 */
5
6
7#ifndef __ASM_ARCH_SPEAR_GPIO_H
8#define __ASM_ARCH_SPEAR_GPIO_H
9
10enum gpio_direction {
11 GPIO_DIRECTION_IN,
12 GPIO_DIRECTION_OUT,
13};
14
15struct 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 */