On 4/11/2023 5:38 PM, Stefan Roese wrote:
On 4/6/23 12:24, Peng Fan (OSS) wrote:
From: Peng Fan <[email protected]>
There will be build error if CONFIG_SYSRESET is enabled, so guard
the reset_cpu with condition check here
Signed-off-by: Peng Fan <[email protected]>
---
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
Hmmm, isn't it possible to move reset_cpu() out of this file into some
other (platform?) directly? IMHO this API does not really belong into
the watchdog infrastructure.
But here reset_cpu use wdog to trigger reset. i.MX7ULP, i.MX93 both use
this driver. It is possible to move it out, but means the macro
definition also needs a copy or else.
Thanks,
Peng.
Thanks,
Stefan