blob: 54e6b5bfd0e6a177a6100da22cff202b1654fd63 [file] [log] [blame]
Stefan Roese2cb06a42012-02-14 14:01:36 +01001/*
2 * Copyright (C) 2012 Stefan Roese <sr@denx.de>
3 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Stefan Roese2cb06a42012-02-14 14:01:36 +01005 */
6
7
8#ifndef __ASM_ARCH_SPEAR_GPIO_H
9#define __ASM_ARCH_SPEAR_GPIO_H
10
11enum gpio_direction {
12 GPIO_DIRECTION_IN,
13 GPIO_DIRECTION_OUT,
14};
15
16struct 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 */