Lines Matching +full:watchdog +full:- +full:timeout +full:- +full:ms
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * sun4v watchdog timer
6 * Implement a simple watchdog driver using the built-in sun4v hypervisor
7 * watchdog support. If time expires, the hypervisor stops or bounces
18 #include <linux/watchdog.h>
27 static unsigned int timeout; variable
28 module_param(timeout, uint, 0);
29 MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default="
34 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
49 * HV watchdog timer will round up the timeout in sun4v_wdt_ping()
51 * watchdog resolution in milliseconds. in sun4v_wdt_ping()
53 hverr = sun4v_mach_set_watchdog(wdd->timeout * 1000, NULL); in sun4v_wdt_ping()
55 return -EINVAL; in sun4v_wdt_ping()
61 unsigned int timeout) in sun4v_wdt_set_timeout() argument
63 wdd->timeout = timeout; in sun4v_wdt_set_timeout()
72 .identity = "sun4v hypervisor watchdog",
89 .timeout = WDT_TIMEOUT,
102 * domain for the watchdog. in sun4v_wdt_init()
103 * watchdog-resolution in sun4v_wdt_init()
104 * watchdog-max-timeout in sun4v_wdt_init()
107 * serious is wrong. Correct to return -ENODEV here. in sun4v_wdt_init()
112 return -ENODEV; in sun4v_wdt_init()
115 err = -ENODEV; in sun4v_wdt_init()
126 /* Allow value of watchdog-resolution up to 1s (default) */ in sun4v_wdt_init()
127 value = mdesc_get_property(handle, node, "watchdog-resolution", NULL); in sun4v_wdt_init()
128 err = -EINVAL; in sun4v_wdt_init()
135 value = mdesc_get_property(handle, node, "watchdog-max-timeout", NULL); in sun4v_wdt_init()
138 * If the property value (in ms) is smaller than in sun4v_wdt_init()
139 * min_timeout, return -EINVAL. in sun4v_wdt_init()
146 * default max_timeout then set watchdog max_timeout to in sun4v_wdt_init()
153 watchdog_init_timeout(&wdd, timeout, NULL); in sun4v_wdt_init()
161 pr_info("initialized (timeout=%ds, nowayout=%d)\n", in sun4v_wdt_init()
162 wdd.timeout, nowayout); in sun4v_wdt_init()
186 MODULE_DESCRIPTION("sun4v watchdog driver");