1*2cb06a4fSStefan Roese /* 2*2cb06a4fSStefan Roese * Copyright (C) 2012 Stefan Roese <sr@denx.de> 3*2cb06a4fSStefan Roese * 4*2cb06a4fSStefan Roese * See file CREDITS for list of people who contributed to this 5*2cb06a4fSStefan Roese * project. 6*2cb06a4fSStefan Roese * 7*2cb06a4fSStefan Roese * This program is free software; you can redistribute it and/or 8*2cb06a4fSStefan Roese * modify it under the terms of the GNU General Public License as 9*2cb06a4fSStefan Roese * published by the Free Software Foundation; either version 2 of 10*2cb06a4fSStefan Roese * the License, or (at your option) any later version. 11*2cb06a4fSStefan Roese * 12*2cb06a4fSStefan Roese * This program is distributed in the hope that it will be useful, 13*2cb06a4fSStefan Roese * but WITHOUT ANY WARRANTY; without even the implied warranty of 14*2cb06a4fSStefan Roese * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*2cb06a4fSStefan Roese * GNU General Public License for more details. 16*2cb06a4fSStefan Roese * 17*2cb06a4fSStefan Roese * You should have received a copy of the GNU General Public License 18*2cb06a4fSStefan Roese * along with this program; if not, write to the Free Software 19*2cb06a4fSStefan Roese * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20*2cb06a4fSStefan Roese * MA 02111-1307 USA 21*2cb06a4fSStefan Roese */ 22*2cb06a4fSStefan Roese 23*2cb06a4fSStefan Roese 24*2cb06a4fSStefan Roese #ifndef __ASM_ARCH_SPEAR_GPIO_H 25*2cb06a4fSStefan Roese #define __ASM_ARCH_SPEAR_GPIO_H 26*2cb06a4fSStefan Roese 27*2cb06a4fSStefan Roese enum gpio_direction { 28*2cb06a4fSStefan Roese GPIO_DIRECTION_IN, 29*2cb06a4fSStefan Roese GPIO_DIRECTION_OUT, 30*2cb06a4fSStefan Roese }; 31*2cb06a4fSStefan Roese 32*2cb06a4fSStefan Roese struct gpio_regs { 33*2cb06a4fSStefan Roese u32 gpiodata[0x100]; /* 0x000 ... 0x3fc */ 34*2cb06a4fSStefan Roese u32 gpiodir; /* 0x400 */ 35*2cb06a4fSStefan Roese }; 36*2cb06a4fSStefan Roese 37*2cb06a4fSStefan Roese #define SPEAR_GPIO_COUNT 8 38*2cb06a4fSStefan Roese #define DATA_REG_ADDR(gpio) (1 << (gpio + 2)) 39*2cb06a4fSStefan Roese 40*2cb06a4fSStefan Roese #endif /* __ASM_ARCH_SPEAR_GPIO_H */ 41