summaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-mx6/iomux-v3.h
diff options
context:
space:
mode:
authorZhang Jiejing <jiejing.zhang@freescale.com>2012-05-18 11:08:05 +0800
committerZhang Jiejing <jiejing.zhang@freescale.com>2012-05-21 09:50:11 +0800
commit500e69df9073a8bc2773274c1139bb036b1a4195 (patch)
tree0aa8fd108e80d33af583382948c3a8fc774d3c92 /include/asm-arm/arch-mx6/iomux-v3.h
parent9b6dfc4b6f0d30b7284511a962e64e83c426b854 (diff)
downloadu-boot-imx-500e69df9073a8bc2773274c1139bb036b1a4195.zip
u-boot-imx-500e69df9073a8bc2773274c1139bb036b1a4195.tar.gz
u-boot-imx-500e69df9073a8bc2773274c1139bb036b1a4195.tar.bz2
ENGR00209899-1 mx6x: add generic gpio interface.
Add generic gpio interface in uboot. Seems more and more gpio operation invoke in uboot, without RAW register operation, we should use generic gpio interface. you should define the CONFIG_MXC_GPIO use generic gpio interface: gpio_request, gpio_direction_output, gpio_direction_input, gpio_set_value, gpio_get_value, etc. Test on MX6Q, MX6DL. Other MX6X should also define this config. Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Diffstat (limited to 'include/asm-arm/arch-mx6/iomux-v3.h')
-rw-r--r--include/asm-arm/arch-mx6/iomux-v3.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-arm/arch-mx6/iomux-v3.h b/include/asm-arm/arch-mx6/iomux-v3.h
index 50612ee..4ce38a5 100644
--- a/include/asm-arm/arch-mx6/iomux-v3.h
+++ b/include/asm-arm/arch-mx6/iomux-v3.h
@@ -55,6 +55,7 @@
*/
typedef u64 iomux_v3_cfg_t;
+typedef unsigned int iomux_pin_name_t;
#define MUX_CTRL_OFS_SHIFT 0
#define MUX_CTRL_OFS_MASK ((iomux_v3_cfg_t)0xfff << MUX_CTRL_OFS_SHIFT)
@@ -84,6 +85,14 @@ typedef u64 iomux_v3_cfg_t;
MUX_SEL_INPUT_OFS_SHIFT) | \
((iomux_v3_cfg_t)(_sel_input) << MUX_SEL_INPUT_SHIFT))
+#if defined CONFIG_MX6Q
+#define MX6X_IOMUX(s) MX6Q_##s
+#elif defined CONFIG_MX6DL
+#define MX6X_IOMUX(s) MX6DL_##s
+#elif defined CONFIG_MX6SL
+#define MX6X_IOMUX(s) MX6SL_##s
+#endif
+
/*
* Use to set PAD control
*/