From: Peng Fan Date: Mon, 14 Aug 2017 10:09:16 +0000 (+0800) Subject: pinctrl: imx: Fix mask when SHARE_MUX_CONF_REG is set X-Git-Tag: v2017.09-rc4~39^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=63fbc59b4f14e6c19b203cca894226874fe68998;p=u-boot pinctrl: imx: Fix mask when SHARE_MUX_CONF_REG is set 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 Cc: Simon Glass Cc: Stefano Babic --- diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c index 1b6107fae6..32cbac963f 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx.c +++ b/drivers/pinctrl/nxp/pinctrl-imx.c @@ -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); }