]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: nuvoton: fix set persist error
authorJim Liu <jim.t90615@gmail.com>
Tue, 13 Sep 2022 06:23:15 +0000 (14:23 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 11 Oct 2022 19:40:48 +0000 (15:40 -0400)
CA9C is cortex A9 watchdog reset control bit.
if device set persist mode, it shouldn't set this bit.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c

index f6e20415e2eabd8c4ad18d515638db73d2e3222a..31678f553794da09dcbdbb143ff7224238d87d41 100644 (file)
@@ -1388,10 +1388,10 @@ static int npcm7xx_gpio_reset_persist(struct udevice *dev, unsigned int banknum,
        dev_dbg(dev, "set gpio persist, bank %d, enable %d\n", banknum, enable);
 
        if (enable) {
-               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD0RCR, BIT(num) | CA9C_RESET, 0);
-               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD1RCR, BIT(num) | CA9C_RESET, 0);
-               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD2RCR, BIT(num) | CA9C_RESET, 0);
-               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_CORSTC, BIT(num) | CA9C_RESET, 0);
+               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD0RCR, BIT(num), 0);
+               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD1RCR, BIT(num), 0);
+               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD2RCR, BIT(num), 0);
+               regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_CORSTC, BIT(num), 0);
        } else {
                regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD0RCR, BIT(num) | CA9C_RESET, BIT(num) | CA9C_RESET);
                regmap_update_bits(priv->rst_regmap, NPCM7XX_RST_WD1RCR, BIT(num) | CA9C_RESET, BIT(num) | CA9C_RESET);