1.add watchdog and timeout is 5s; 2.do not print: watchdog did not stop!

This commit is contained in:
Toby 2025-11-07 17:32:34 +08:00
parent ef82bd9e2a
commit df4488c95c
2 changed files with 7 additions and 2 deletions

View File

@ -667,6 +667,11 @@
status = "okay"; status = "okay";
}; };
&wdt {
timeout-sec = <5>; // 设置超时为5秒
status = "okay"; // 启用看门狗节点
};
&u2phy { &u2phy {
status = "okay"; status = "okay";

View File

@ -877,10 +877,10 @@ static int watchdog_release(struct inode *inode, struct file *file)
err = watchdog_stop(wdd); err = watchdog_stop(wdd);
/* If the watchdog was not stopped, send a keepalive ping */ /* If the watchdog was not stopped, send a keepalive ping */
if (err < 0) { /*if (err < 0) {
pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id); pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id);
watchdog_ping(wdd); watchdog_ping(wdd);
} }*/
watchdog_update_worker(wdd); watchdog_update_worker(wdd);