summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-vf610.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-02-13 09:26:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-02-13 09:26:04 +0100
commit30139163b75970fcd58df6b6b987883e36571046 (patch)
tree00bd354cefa617f8474cc73994b1a72c11e770a0 /drivers/pinctrl/pinctrl-vf610.c
parentbb1a6a2fd3cc41be6db1a1362f311456019317b1 (diff)
parent19df384cec181be4407f82377ffbb3059b1ed748 (diff)
downloadbarebox-30139163b75970fcd58df6b6b987883e36571046.tar.gz
Merge branch 'for-next/imx'
Diffstat (limited to 'drivers/pinctrl/pinctrl-vf610.c')
-rw-r--r--drivers/pinctrl/pinctrl-vf610.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-vf610.c b/drivers/pinctrl/pinctrl-vf610.c
index b479bf2..4234263 100644
--- a/drivers/pinctrl/pinctrl-vf610.c
+++ b/drivers/pinctrl/pinctrl-vf610.c
@@ -24,9 +24,10 @@
#include <malloc.h>
#include <gpio.h>
+#include <mach/iomux-vf610.h>
+
enum {
PINCTRL_VF610_MUX_LINE_SIZE = 20,
- PINCTRL_VF610_MUX_SHIFT = 20,
PINCTRL_VF610_IBE = 1 << 0,
PINCTRL_VF610_OBE = 1 << 1,
@@ -60,17 +61,17 @@ static int pinctrl_vf610_set_state(struct pinctrl_device *pdev,
npins = size / PINCTRL_VF610_MUX_LINE_SIZE;
for (i = 0; i < npins; i++) {
+ iomux_v3_cfg_t pad;
u32 mux_reg = be32_to_cpu(*list++);
u32 input_reg = be32_to_cpu(*list++);
u32 mux_val = be32_to_cpu(*list++);
u32 input_val = be32_to_cpu(*list++);
u32 conf_val = be32_to_cpu(*list++);
- writel(mux_val << PINCTRL_VF610_MUX_SHIFT | conf_val,
- iomux->base + mux_reg);
+ pad = IOMUX_PAD(mux_reg, mux_reg, mux_val,
+ input_reg, input_val, conf_val);
- if (input_reg)
- writel(input_val, iomux->base + input_reg);
+ vf610_setup_pad(iomux->base, pad);
}
return 0;