summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/iomux-imx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mxs/iomux-imx.c')
-rw-r--r--arch/arm/mach-mxs/iomux-imx.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/arch/arm/mach-mxs/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
index 84c6ca4ca7..68a4e3cbd6 100644
--- a/arch/arm/mach-mxs/iomux-imx.c
+++ b/arch/arm/mach-mxs/iomux-imx.c
@@ -75,12 +75,6 @@ static unsigned calc_output_reg(unsigned no)
return ((no >> 5) << 4) + HW_PINCTRL_DOUT0;
}
-static unsigned calc_input_reg(unsigned no)
-{
- /* each register controls 32 pads */
- return ((no >> 5) << 4) + HW_PINCTRL_DIN0;
-}
-
/**
* @param[in] m One pin define per call from iomux-mx23.h/iomux-mx28.h
*/
@@ -168,57 +162,3 @@ void imx_gpio_mode(uint32_t m)
}
}
}
-
-int gpio_direction_input(unsigned gpio)
-{
- unsigned reg_offset;
-
- if (gpio > MAX_GPIO_NO)
- return -EINVAL;
-
- reg_offset = calc_output_enable_reg(gpio);
- writel(0x1 << (gpio % 32), IMX_IOMUXC_BASE + reg_offset + STMP_OFFSET_REG_CLR);
-
- return 0;
-}
-
-int gpio_direction_output(unsigned gpio, int val)
-{
- unsigned reg_offset;
-
- if (gpio > MAX_GPIO_NO)
- return -EINVAL;
-
- /* first set the output value... */
- reg_offset = calc_output_reg(gpio);
- writel(0x1 << (gpio % 32), IMX_IOMUXC_BASE +
- reg_offset + (val != 0 ? STMP_OFFSET_REG_SET : STMP_OFFSET_REG_CLR));
- /* ...then the direction */
- reg_offset = calc_output_enable_reg(gpio);
- writel(0x1 << (gpio % 32), IMX_IOMUXC_BASE + reg_offset + STMP_OFFSET_REG_SET);
-
- return 0;
-}
-
-void gpio_set_value(unsigned gpio, int val)
-{
- unsigned reg_offset;
-
- reg_offset = calc_output_reg(gpio);
- writel(0x1 << (gpio % 32), IMX_IOMUXC_BASE +
- reg_offset + (val != 0 ?
- STMP_OFFSET_REG_SET : STMP_OFFSET_REG_CLR));
-}
-
-int gpio_get_value(unsigned gpio)
-{
- uint32_t reg;
- unsigned reg_offset;
-
- reg_offset = calc_input_reg(gpio);
- reg = readl(IMX_IOMUXC_BASE + reg_offset);
- if (reg & (0x1 << (gpio % 32)))
- return 1;
-
- return 0;
-}