Stefano Babic | fc05b90 | 2012-08-19 21:33:50 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 |
| 3 | * Stefano Babic, DENX Software Engineering, <sbabic@denx.de> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Stefano Babic | fc05b90 | 2012-08-19 21:33:50 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | |
| 9 | #ifndef __ASM_ARCH_IMX_GPIO_H |
| 10 | #define __ASM_ARCH_IMX_GPIO_H |
| 11 | |
| 12 | #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) |
| 13 | /* GPIO registers */ |
| 14 | struct gpio_regs { |
| 15 | u32 gpio_dr; /* data */ |
| 16 | u32 gpio_dir; /* direction */ |
| 17 | u32 gpio_psr; /* pad satus */ |
| 18 | }; |
| 19 | #endif |
| 20 | |
| 21 | #define IMX_GPIO_NR(port, index) ((((port)-1)*32)+((index)&31)) |
| 22 | |
| 23 | #endif |