]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/include/asm/arch-mxs/gpio.h
Merge branch 'tx6-bugfix'
[karo-tx-uboot.git] / arch / arm / include / asm / arch-mxs / gpio.h
1 /*
2  * Freescale i.MX28 GPIO
3  *
4  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
5  * on behalf of DENX Software Engineering GmbH
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9
10 #ifndef __MX28_GPIO_H__
11 #define __MX28_GPIO_H__
12
13 #ifdef  CONFIG_MXS_GPIO
14 void mxs_gpio_init(void);
15 #else
16 inline void mxs_gpio_init(void) {}
17 #endif
18
19 #define MXS_GPIO_NR(p, o)       (((p) * 32) | ((o) & 0x1f))
20 #define MXS_GPIO_TO_BANK(gpio)  ((gpio) / 32)
21 #define MXS_GPIO_TO_PIN(gpio)   ((gpio) % 32)
22
23 #endif  /* __MX28_GPIO_H__ */