]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
watchdog: ulp_wdog: guard reset_cpu with condition check
authorPeng Fan <peng.fan@nxp.com>
Fri, 28 Apr 2023 04:08:26 +0000 (12:08 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 21 May 2023 14:54:40 +0000 (16:54 +0200)
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>
drivers/watchdog/ulp_wdog.c

index c21aa3af55fa1754f6bc5e431ede70a6465e47d5..0eea04ed2c6ed7ac0aef6a16b5863b84c5ce86c5 100644 (file)
@@ -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)
 {