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:
parent
17a112fe72
commit
107d6954a6
|
@ -139,6 +139,23 @@ static inline void iomux_v3_setup_pad(void __iomem *iomux, unsigned int flags,
|
||||||
writel(input_val, iomux + input_reg);
|
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
|
* setups a single pad in the iomuxer
|
||||||
|
|
Loading…
Reference in New Issue