[PATCH 09/16] i.MX: iomuxv3: Add low-level pad configuration routine
Andrey Smirnov
andrew.smirnov at gmail.com
Mon Dec 5 06:54:37 PST 2016
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 at gmail.com>
---
arch/arm/mach-imx/include/mach/iomux-v3.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/mach-imx/include/mach/iomux-v3.h b/arch/arm/mach-imx/include/mach/iomux-v3.h
index 470f774..0205ec7 100644
--- a/arch/arm/mach-imx/include/mach/iomux-v3.h
+++ b/arch/arm/mach-imx/include/mach/iomux-v3.h
@@ -147,6 +147,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)
+{
+ union iomux_v3_pad pad = { .raw = __pad };
+ uint32_t pad_ctrl;
+
+ pad_ctrl = (pad.cfg.pad_ctrl & NO_PAD_CTRL) ? 0 : pad.cfg.pad_ctrl,
+
+ iomux_v3_setup_pad(iomux, 0,
+ pad.cfg.mux_ctrl_ofs,
+ pad.cfg.pad_ctrl_ofs,
+ pad.cfg.sel_input_ofs,
+ pad.cfg.mux_mode,
+ pad_ctrl,
+ pad.cfg.sel_inp);
+}
+
+
/*
* setups a single pad in the iomuxer
--
2.5.5
More information about the barebox
mailing list