Home | History | Annotate | Download | only in arch-spear
      1 /* SPDX-License-Identifier: GPL-2.0+ */
      2 /*
      3  * Copyright (C) 2012 Stefan Roese <sr (at) denx.de>
      4  */
      5 
      6 
      7 #ifndef __ASM_ARCH_SPEAR_GPIO_H
      8 #define __ASM_ARCH_SPEAR_GPIO_H
      9 
     10 enum gpio_direction {
     11 	GPIO_DIRECTION_IN,
     12 	GPIO_DIRECTION_OUT,
     13 };
     14 
     15 struct 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 */
     24