diff options
Diffstat (limited to 'arch/arm/imx-common/iomux-v3.c')
-rw-r--r-- | arch/arm/imx-common/iomux-v3.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c index e88e6e2a98..22c536e0c3 100644 --- a/arch/arm/imx-common/iomux-v3.c +++ b/arch/arm/imx-common/iomux-v3.c @@ -92,3 +92,22 @@ void imx_iomux_set_gpr_register(int group, int start_bit, reg |= (value << start_bit); writel(reg, base + group * 4); } + +#ifdef CONFIG_IOMUX_SHARE_CONF_REG +void imx_iomux_gpio_set_direction(unsigned int gpio, + unsigned int direction) +{ + u32 reg; + /* + * Only on Vybrid the input/output buffer enable flags + * are part of the shared mux/conf register. + */ + reg = readl(base + (gpio << 2)); + if(direction) + reg |= 0x2; + else + reg &= ~0x2; + + writel(reg, (base + (gpio << 2))); +} +#endif |