9
0
Fork 0

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>
This commit is contained in:
Andrey Smirnov 2017-01-10 07:09:05 -08:00 committed by Sascha Hauer
parent 17a112fe72
commit 107d6954a6
1 changed files with 17 additions and 0 deletions

View File

@ -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