[U-Boot] [PATCH v4 5/6] ARM: imx: pinctrl: Add support for i.MX2 mxs pinctrl driver
marex at denx.de
Tue Jun 18 22:13:57 UTC 2019
On 6/19/19 12:01 AM, Lukasz Majewski wrote:
> The code responsible for setting proper values in the MUX registers
> (in the mxs_pinctrl_set_state()) has been ported from Linux kernel
> - SHA1: 17bb763e7eaf tag v5.1.11 from linux-stable.
Maybe you want to keep the DTs and this driver based off the same
version of Linux kernel.
Tags are "pinctrl: mxs: ".
> As the pinctrl node in the imx28.dtsi file has gpio pins nodes as subnodes,
> it was necessary to use 'dm_scan_fdt_dev()' (as a .bind method) to also
> make them 'visible' by the DM's "gpio_mxs" driver.
> Signed-off-by: Lukasz Majewski <lukma at denx.de>
> +static void mxs_pinctrl_rmwl(u32 value, u32 mask, u8 shift, void __iomem *reg)
> + u32 tmp;
This is clrsetbits_le32() reimplementation.
> + tmp = readl(reg);
> + tmp &= ~(mask << shift);
> + tmp |= value << shift;
> + writel(tmp, reg);
More information about the U-Boot