aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2023-04-28 12:08:26 +0800
committerStefano Babic <sbabic@denx.de>2023-05-21 16:54:40 +0200
commitfee8cf214af0807823865cfa4cc3d5e39eb8da3c (patch)
tree6b20eb55e2451457ceab9557075e2b1978d46ee1
parent33866e94098819c828927dc0f31c3b8c4e22b8cb (diff)
downloadu-boot-fee8cf214af0807823865cfa4cc3d5e39eb8da3c.zip
u-boot-fee8cf214af0807823865cfa4cc3d5e39eb8da3c.tar.gz
u-boot-fee8cf214af0807823865cfa4cc3d5e39eb8da3c.tar.bz2
watchdog: ulp_wdog: guard reset_cpu with condition check
There will be build error if CONFIG_SYSRESET is enabled, so guard the reset_cpu with condition check here Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
-rw-r--r--drivers/watchdog/ulp_wdog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index c21aa3a..0eea04e 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -122,6 +122,7 @@ void hw_watchdog_init(void)
ulp_watchdog_init(wdog, CONFIG_WATCHDOG_TIMEOUT_MSECS);
}
+#if !CONFIG_IS_ENABLED(SYSRESET)
void reset_cpu(void)
{
struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR;
@@ -159,6 +160,7 @@ void reset_cpu(void)
while (1);
}
+#endif
static int ulp_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
{