aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthias Weisser2011-07-06 00:28:32 +0000
committerAlbert ARIBAUD2011-07-14 15:41:24 +0200
commit95d185894bcb6c3dffb70ef69f3c80516d19bd49 (patch)
treee67f030c5a249f3c589d232077b6eaf041203bf4 /include
parent23210d8e1b369404c27ec6cc4a44ed069c4bb5ac (diff)
imx: Make imx25 compatible to mxc_gpio driver and fix in tx25
Adding support for mxc_gpio driver for imx25 and fix names of registers in tx25 board. Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Diffstat (limited to 'include')
-rw-r--r--include/mxc_gpio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mxc_gpio.h b/include/mxc_gpio.h
index 002ba61e006..f673dcecd69 100644
--- a/include/mxc_gpio.h
+++ b/include/mxc_gpio.h
@@ -24,6 +24,11 @@
#ifndef __MXC_GPIO_H
#define __MXC_GPIO_H
+/* Converts a GPIO port number and the internal bit position
+ * to the GPIO number
+ */
+#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f))
+
enum mxc_gpio_direction {
MXC_GPIO_DIRECTION_IN,
MXC_GPIO_DIRECTION_OUT,