Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * RTAS calls are available
8 * RTAS watchdog driver
11 * device driver to exploit watchdog RTAS functions
29 #include <asm/rtas.h>
36 MODULE_DESCRIPTION("RTAS watchdog driver");
62 * wdrtas_set_interval - sets the watchdog interval
67 * wdrtas_set_interval sets the watchdog keepalive interval by calling the
68 * RTAS function set-indicator (surveillance). The unit of interval is
77 /* rtas uses minutes */ in wdrtas_set_interval()
85 print_msg--; in wdrtas_set_interval()
94 * wdrtas_get_interval - returns the current watchdog interval
95 * @fallback_value: value (in seconds) to use, if the RTAS call fails
100 * as reported by the RTAS function ibm,get-system-parameter. The unit
123 /* rtas uses minutes */ in wdrtas_get_interval()
128 * wdrtas_timer_start - starts watchdog
130 * wdrtas_timer_start starts the watchdog by calling the RTAS function
131 * set-interval (surveillance)
139 * wdrtas_timer_stop - stops watchdog
141 * wdrtas_timer_stop stops the watchdog timer by calling the RTAS function
142 * set-interval (surveillance)
150 * wdrtas_timer_keepalive - resets watchdog timer to keep system alive
152 * wdrtas_timer_keepalive restarts the watchdog timer by calling the
153 * RTAS function event-scan and repeats these calls as long as there are
166 pr_err("event-scan failed: %li\n", result); in wdrtas_timer_keepalive()
175 * wdrtas_get_temperature - returns current temperature
180 * uses the RTAS call get-sensor-state, token 3 to do so
198 * wdrtas_get_status - returns the status of the watchdog
209 * wdrtas_get_boot_status - returns the reason for the last boot
221 /* wdrtas_write - called when watchdog device is written to
248 return -EFAULT; in wdrtas_write()
262 * wdrtas_ioctl - ioctl function for the watchdog device
286 return -EFAULT; in wdrtas_ioctl()
299 return -EOPNOTSUPP; in wdrtas_ioctl()
306 return -EFAULT; in wdrtas_ioctl()
313 /* not implemented. Done by H8 in wdrtas_ioctl()
324 return -EFAULT; in wdrtas_ioctl()
327 return -EINVAL; in wdrtas_ioctl()
341 return -ENOTTY; in wdrtas_ioctl()
346 * wdrtas_open - open function of watchdog device
350 * returns 0 on success, -EBUSY if the file has been opened already, <0 on
360 return -EBUSY; in wdrtas_open()
370 * wdrtas_close - close function of watchdog device
394 * wdrtas_temp_read - gives back the temperature in fahrenheit
400 * returns always 1 or -EFAULT in case of user space copy failures, <0 on
403 * wdrtas_temp_read gives the temperature to the users by copying this
416 return -EFAULT; in wdrtas_temp_read()
422 * wdrtas_temp_open - open function of temperature device
436 * wdrtas_temp_close - close function of temperature device
450 * wdrtas_reboot - reboot notifier function
503 * wdrtas_get_tokens - reads in RTAS tokens
507 * wdrtas_get_tokens reads in the tokens for the RTAS calls used in
508 * this watchdog driver. It tolerates, if "get-sensor-state" and
509 * "ibm,get-system-parameter" are not available.
513 wdrtas_token_get_sensor_state = rtas_token("get-sensor-state"); in wdrtas_get_tokens()
515 …pr_warn("couldn't get token for get-sensor-state. Trying to continue without temperature support.\… in wdrtas_get_tokens()
518 wdrtas_token_get_sp = rtas_token("ibm,get-system-parameter"); in wdrtas_get_tokens()
520 …pr_warn("couldn't get token for ibm,get-system-parameter. Trying to continue with a default timeou… in wdrtas_get_tokens()
524 wdrtas_token_set_indicator = rtas_token("set-indicator"); in wdrtas_get_tokens()
526 pr_err("couldn't get token for set-indicator. Terminating watchdog code.\n"); in wdrtas_get_tokens()
527 return -EIO; in wdrtas_get_tokens()
530 wdrtas_token_event_scan = rtas_token("event-scan"); in wdrtas_get_tokens()
532 pr_err("couldn't get token for event-scan. Terminating watchdog code.\n"); in wdrtas_get_tokens()
533 return -EIO; in wdrtas_get_tokens()
540 * wdrtas_unregister_devs - unregisters the misc dev handlers
553 * wdrtas_register_devs - registers the misc dev handlers
582 * wdrtas_init - init function of the watchdog driver
591 return -ENODEV; in wdrtas_init()
594 return -ENODEV; in wdrtas_init()
599 return -ENODEV; in wdrtas_init()
611 * wdrtas_exit - exit function of the watchdog driver