summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Liu <jim.t90615@gmail.com>2023-07-04 16:00:12 +0800
committerTom Rini <trini@konsulko.com>2023-07-14 12:52:18 -0400
commit0adbb8fbb1b64ae45b76cd6b1a639856d3a82de4 (patch)
treef96595811f435eea5004af61d92e5056778486c7
parent68f107a42b2b0f26c46afe92804485ea68951d6f (diff)
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
index f18be08518e..7976e3b3ed5 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)