summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2017-01-10 07:09:05 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2017-01-12 07:42:29 +0100
commit107d6954a62dce2cfd3fd7a2d5b3b6c3a3a32148 (patch)
treea5a5cd5ce959d049ea4ec3f997854ca8d03f1062
parent17a112fe7256b399497be0d44fa974073e606364 (diff)
downloadbarebox-107d6954a62dce2cfd3fd7a2d5b3b6c3a3a32148.tar.gz
i.MX: iomuxv3: Add low-level pad configuration routine
Add low-level pad configuration routine that can be used by early boot code as well as leveraged by pinmux driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-v3.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/include/mach/iomux-v3.h b/arch/arm/mach-imx/include/mach/iomux-v3.h
index 1ecd11b..f877aad 100644
--- a/arch/arm/mach-imx/include/mach/iomux-v3.h
+++ b/arch/arm/mach-imx/include/mach/iomux-v3.h
@@ -139,6 +139,23 @@ static inline void iomux_v3_setup_pad(void __iomem *iomux, unsigned int flags,
writel(input_val, iomux + input_reg);
}
+static inline void imx_setup_pad(void __iomem *iomux, iomux_v3_cfg_t pad)
+{
+ uint32_t pad_ctrl;
+
+ pad_ctrl = IOMUX_PAD_CTRL(pad);
+ pad_ctrl = (pad_ctrl & NO_PAD_CTRL) ? 0 : pad_ctrl,
+
+ iomux_v3_setup_pad(iomux, 0,
+ IOMUX_CTRL_OFS(pad),
+ IOMUX_PAD_CTRL_OFS(pad),
+ IOMUX_SEL_INPUT_OFS(pad),
+ IOMUX_MODE(pad),
+ pad_ctrl,
+ IOMUX_SEL_INPUT(pad));
+}
+
+
/*
* setups a single pad in the iomuxer