diff options
author | Jim Liu <jim.t90615@gmail.com> | 2023-07-04 11:00:12 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 22:21:07 +0300 |
commit | e4587a7d69506592a2a3f0250b7cff232a4bd792 (patch) | |
tree | f2714461c1b08fbca3c993b421bf5472c4f095c0 | |
parent | 094311192b93b041f4e1b54dceb7841e7d509bb2 (diff) | |
download | u-boot-e4587a7d69506592a2a3f0250b7cff232a4bd792.tar.xz |
pinctrl: nuvoton: fix reset reason error for poweron
In non tip mode, BMC first power on with PORST+CORST.
the gpio status will error.
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
-rw-r--r-- | drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c index f18be08518..7976e3b3ed 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -808,6 +808,9 @@ static bool is_gpio_persist(struct udevice *dev, uint bank) status = npcm_get_reset_status(); dev_dbg(dev, "reset status: 0x%x\n", status); + if (status & PORST) + return false; + if (status & CORST) regmap_read(priv->rst_regmap, CORSTC, &val); else if (status & WD0RST) |