summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-spear/gpio.h
blob: 54e6b5bfd0e6a177a6100da22cff202b1654fd63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (C) 2012 Stefan Roese <sr@denx.de>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */


#ifndef __ASM_ARCH_SPEAR_GPIO_H
#define __ASM_ARCH_SPEAR_GPIO_H

enum gpio_direction {
	GPIO_DIRECTION_IN,
	GPIO_DIRECTION_OUT,
};

struct gpio_regs {
	u32 gpiodata[0x100];	/* 0x000 ... 0x3fc */
	u32 gpiodir;		/* 0x400 */
};

#define SPEAR_GPIO_COUNT		8
#define DATA_REG_ADDR(gpio)		(1 << (gpio + 2))

#endif	/* __ASM_ARCH_SPEAR_GPIO_H */
OpenPOWER on IntegriCloud