]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: imx: Fix mask when SHARE_MUX_CONF_REG is set
authorPeng Fan <peng.fan@nxp.com>
Mon, 14 Aug 2017 10:09:16 +0000 (18:09 +0800)
committerStefano Babic <sbabic@denx.de>
Wed, 23 Aug 2017 08:47:00 +0000 (10:47 +0200)
when using SHARE_MUX_CONF_REG, wrong mask is used for
writing config value, which causes mux value is cleared.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
drivers/pinctrl/nxp/pinctrl-imx.c

index 1b6107fae600f64ece0fd11eddf09aee00839de5..32cbac963f7bb43826737cb9a1f2695d0a0b09fc 100644 (file)
@@ -158,7 +158,7 @@ static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
                if (!(config_val & IMX_NO_PAD_CTL)) {
                        if (info->flags & SHARE_MUX_CONF_REG) {
                                clrsetbits_le32(info->base + conf_reg,
-                                               info->mux_mask, config_val);
+                                               ~info->mux_mask, config_val);
                        } else {
                                writel(config_val, info->base + conf_reg);
                        }