[PATCH] watchdog: ulp_wdog: guard reset_cpu with condition check
Peng Fan (OSS)
peng.fan at oss.nxp.com
Thu Apr 6 12:24:35 CEST 2023
From: Peng Fan <peng.fan at nxp.com>
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 at nxp.com>
---
drivers/watchdog/ulp_wdog.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index c21aa3af55f..0eea04ed2c6 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)
{
--
2.36.0
More information about the U-Boot
mailing list