Searched refs:watchdog (Results 1 - 200 of 612) sorted by relevance

1234

/linux-4.4.14/Documentation/watchdog/src/
H A DMakefile2 hostprogs-y := watchdog-simple watchdog-test
H A Dwatchdog-simple.c8 int fd = open("/dev/watchdog", O_WRONLY); main()
11 perror("watchdog"); main()
H A Dwatchdog-test.c13 #include <linux/watchdog.h>
37 fprintf(stderr, "Stopping watchdog ticks...\n"); term()
46 fd = open("/dev/watchdog", O_WRONLY); main()
/linux-4.4.14/arch/sparc/include/uapi/asm/
H A Dwatchdog.h3 * watchdog - Driver interface for the hardware watchdog timers
13 #include <linux/watchdog.h>
16 * Ref. <linux/watchdog.h> for standard linux watchdog ioctls
/linux-4.4.14/drivers/watchdog/
H A Df71808e_wdt.c35 #include <linux/watchdog.h>
78 watchdog signal */
79 #define WATCHDOG_F71862FG_PIN 63 /* default watchdog reset output
108 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
112 MODULE_PARM_DESC(start_withtimeout, "Start watchdog timer on module load with"
149 char caused_reboot; /* last reboot was by the watchdog */
152 static struct watchdog_data watchdog = { variable in typeref:struct:watchdog_data
153 .lock = __MUTEX_INITIALIZER(watchdog.lock),
222 pr_err("watchdog timeout out of range\n"); watchdog_set_timeout()
226 mutex_lock(&watchdog.lock); watchdog_set_timeout()
228 watchdog.timeout = timeout; watchdog_set_timeout()
230 watchdog.timer_val = DIV_ROUND_UP(timeout, 60); watchdog_set_timeout()
231 watchdog.minutes_mode = true; watchdog_set_timeout()
233 watchdog.timer_val = timeout; watchdog_set_timeout()
234 watchdog.minutes_mode = false; watchdog_set_timeout()
237 mutex_unlock(&watchdog.lock); watchdog_set_timeout()
246 mutex_lock(&watchdog.lock); watchdog_set_pulse_width()
249 watchdog.pulse_val = 0; watchdog_set_pulse_width()
251 watchdog.pulse_val = 1; watchdog_set_pulse_width()
253 watchdog.pulse_val = 2; watchdog_set_pulse_width()
255 watchdog.pulse_val = 3; watchdog_set_pulse_width()
262 watchdog.pulse_mode = pw; watchdog_set_pulse_width()
265 mutex_unlock(&watchdog.lock); watchdog_set_pulse_width()
273 mutex_lock(&watchdog.lock); watchdog_keepalive()
274 err = superio_enter(watchdog.sioaddr); watchdog_keepalive()
277 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_keepalive()
279 if (watchdog.minutes_mode) watchdog_keepalive()
281 superio_set_bit(watchdog.sioaddr, F71808FG_REG_WDT_CONF, watchdog_keepalive()
285 superio_clear_bit(watchdog.sioaddr, F71808FG_REG_WDT_CONF, watchdog_keepalive()
289 superio_outb(watchdog.sioaddr, F71808FG_REG_WD_TIME, watchdog_keepalive()
290 watchdog.timer_val); watchdog_keepalive()
292 superio_exit(watchdog.sioaddr); watchdog_keepalive()
295 mutex_unlock(&watchdog.lock); watchdog_keepalive()
322 /* Make sure we don't die as soon as the watchdog is enabled below */ watchdog_start()
327 mutex_lock(&watchdog.lock); watchdog_start()
328 err = superio_enter(watchdog.sioaddr); watchdog_start()
331 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_start()
334 switch (watchdog.type) { watchdog_start()
337 superio_clear_bit(watchdog.sioaddr, SIO_REG_MFUNCT2, 3); watchdog_start()
338 superio_clear_bit(watchdog.sioaddr, SIO_REG_MFUNCT3, 3); watchdog_start()
342 err = f71862fg_pin_configure(watchdog.sioaddr); watchdog_start()
349 superio_clear_bit(watchdog.sioaddr, SIO_REG_MFUNCT1, 4); watchdog_start()
354 superio_set_bit(watchdog.sioaddr, SIO_REG_MFUNCT1, 1); watchdog_start()
359 superio_outb(watchdog.sioaddr, SIO_REG_MFUNCT3, watchdog_start()
360 superio_inb(watchdog.sioaddr, SIO_REG_MFUNCT3) & 0xcf); watchdog_start()
372 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_start()
373 superio_set_bit(watchdog.sioaddr, SIO_REG_ENABLE, 0); watchdog_start()
374 superio_set_bit(watchdog.sioaddr, F71808FG_REG_WDO_CONF, watchdog_start()
377 superio_set_bit(watchdog.sioaddr, F71808FG_REG_WDT_CONF, watchdog_start()
380 if (watchdog.pulse_mode) { watchdog_start()
382 u8 wdt_conf = superio_inb(watchdog.sioaddr, watchdog_start()
386 wdt_conf = (wdt_conf & 0xfc) | (watchdog.pulse_val & 0x03); watchdog_start()
390 superio_outb(watchdog.sioaddr, F71808FG_REG_WDT_CONF, watchdog_start()
394 superio_clear_bit(watchdog.sioaddr, F71808FG_REG_WDT_CONF, watchdog_start()
399 superio_exit(watchdog.sioaddr); watchdog_start()
401 mutex_unlock(&watchdog.lock); watchdog_start()
410 mutex_lock(&watchdog.lock); watchdog_stop()
411 err = superio_enter(watchdog.sioaddr); watchdog_stop()
414 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_stop()
416 superio_clear_bit(watchdog.sioaddr, F71808FG_REG_WDT_CONF, watchdog_stop()
419 superio_exit(watchdog.sioaddr); watchdog_stop()
422 mutex_unlock(&watchdog.lock); watchdog_stop()
431 mutex_lock(&watchdog.lock); watchdog_get_status()
432 status = (watchdog.caused_reboot) ? WDIOF_CARDRESET : 0; watchdog_get_status()
433 mutex_unlock(&watchdog.lock); watchdog_get_status()
441 * if we fail to determine the watchdog's status assume it to be watchdog_is_running()
446 mutex_lock(&watchdog.lock); watchdog_is_running()
447 if (superio_enter(watchdog.sioaddr)) watchdog_is_running()
449 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_is_running()
451 is_running = (superio_inb(watchdog.sioaddr, SIO_REG_ENABLE) & BIT(0)) watchdog_is_running()
452 && (superio_inb(watchdog.sioaddr, F71808FG_REG_WDT_CONF) watchdog_is_running()
455 superio_exit(watchdog.sioaddr); watchdog_is_running()
458 mutex_unlock(&watchdog.lock); watchdog_is_running()
462 /* /dev/watchdog api */
468 /* If the watchdog is alive we don't need to start it again */ watchdog_open()
469 if (test_and_set_bit(0, &watchdog.opened)) watchdog_open()
474 clear_bit(0, &watchdog.opened); watchdog_open()
481 watchdog.expect_close = 0; watchdog_open()
487 clear_bit(0, &watchdog.opened); watchdog_release()
489 if (!watchdog.expect_close) { watchdog_release()
491 pr_crit("Unexpected close, not stopping watchdog!\n"); watchdog_release()
500 * @file: file handle to the watchdog
505 * A write to a watchdog device is defined as a keepalive signal. Any
527 mutex_lock(&watchdog.lock); watchdog_write()
528 watchdog.expect_close = expect_close; watchdog_write()
529 mutex_unlock(&watchdog.lock); watchdog_write()
542 * @cmd: watchdog command
545 * The watchdog API defines a common set of functions for all watchdogs
563 return copy_to_user(uarg.ident, &watchdog.ident, watchdog_ioctl()
564 sizeof(watchdog.ident)) ? -EFAULT : 0; watchdog_ioctl()
601 return put_user(watchdog.timeout, uarg.i); watchdog_ioctl()
628 .name = "watchdog",
640 /* No need to lock watchdog.lock here because no entry points watchdog_init()
643 watchdog.sioaddr = sioaddr; watchdog_init()
644 watchdog.ident.options = WDIOC_SETTIMEOUT watchdog_init()
648 snprintf(watchdog.ident.identity, watchdog_init()
649 sizeof(watchdog.ident.identity), "%s watchdog", watchdog_init()
650 f71808e_names[watchdog.type]); watchdog_init()
655 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_init()
658 watchdog.caused_reboot = wdt_conf & F71808FG_FLAG_WDTMOUT_STS; watchdog_init()
690 pr_err("cannot start watchdog timer\n"); watchdog_init()
694 mutex_lock(&watchdog.lock); watchdog_init()
698 superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT); watchdog_init()
715 mutex_unlock(&watchdog.lock); watchdog_init()
720 pr_info("watchdog started with initial timeout of %u sec\n", watchdog_init()
727 mutex_unlock(&watchdog.lock); watchdog_init()
753 watchdog.type = f71808fg; f71808e_find()
756 watchdog.type = f71862fg; f71808e_find()
761 watchdog.type = f71869; f71808e_find()
764 watchdog.type = f71882fg; f71808e_find()
767 watchdog.type = f71889fg; f71808e_find()
770 /* Confirmed (by datasheet) not to have a watchdog. */ f71808e_find()
780 pr_info("Found %s watchdog chip, revision %d\n", f71808e_find()
781 f71808e_names[watchdog.type], f71808e_find()
H A Dwatchdog_dev.c11 * by all the watchdog timer drivers.
14 * misc device: /dev/watchdog.
40 #include <linux/watchdog.h> /* For watchdog specific items */
47 /* the dev_t structure to store the dynamically allocated watchdog devices */
49 /* the watchdog device behind /dev/watchdog */
53 * watchdog_ping: ping the watchdog.
54 * @wdd: the watchdog device to ping
56 * If the watchdog has no own ping operation then it needs to be
59 * We only ping when the watchdog device is running.
77 err = wdd->ops->ping(wdd); /* ping the watchdog */ watchdog_ping()
79 err = wdd->ops->start(wdd); /* restart watchdog */ watchdog_ping()
87 * watchdog_start: wrapper to start the watchdog.
88 * @wdd: the watchdog device to start
90 * Start the watchdog if it is not active and mark it active.
119 * watchdog_stop: wrapper to stop the watchdog.
120 * @wdd: the watchdog device to stop
122 * Stop the watchdog if it is still active and unmark it active.
125 * If the 'nowayout' feature was set, the watchdog cannot be stopped.
143 dev_info(wdd->dev, "nowayout prevents watchdog being stopped!\n"); watchdog_stop()
158 * watchdog_get_status: wrapper to get the watchdog status
159 * @wdd: the watchdog device to get the status from
160 * @status: the status of the watchdog device
162 * Get the watchdog's status flags.
189 * watchdog_set_timeout: set the watchdog timer timeout
190 * @wdd: the watchdog device to set the timeout for
221 * @wdd: the watchdog device to get the remaining time from
224 * Get the time before a watchdog will reboot (if not pinged).
251 * watchdog_ioctl_op: call the watchdog drivers ioctl op if defined
252 * @wdd: the watchdog device to do the ioctl on
253 * @cmd: watchdog command
280 * watchdog_write: writes to the watchdog.
286 * A write to a watchdog device is defined as a keepalive ping.
288 * off the watchdog (if 'nowayout' is not set).
316 /* someone wrote to us, so we send the watchdog a keepalive ping */ watchdog_write()
325 * watchdog_ioctl: handle the different ioctl's for the watchdog device.
327 * @cmd: watchdog command
330 * The watchdog API defines a common set of functions for all watchdogs
382 /* If the watchdog is active then we send a keepalive ping watchdog_ioctl()
383 * to make sure that the watchdog keep's running (and if watchdog_ioctl()
405 * watchdog_open: open the /dev/watchdog* devices.
409 * When the /dev/watchdog* device gets opened, we start the watchdog.
410 * Watch out: the /dev/watchdog device is single open, so we make sure
419 /* Get the corresponding watchdog device */ watchdog_open()
425 /* the watchdog is single open! */ watchdog_open()
430 * If the /dev/watchdog device is open, we don't want the module watchdog_open()
445 /* dev/watchdog is a virtual (and thus non-seekable) filesystem */ watchdog_open()
456 * watchdog_release: release the watchdog device.
460 * This is the code for when /dev/watchdog gets closed. We will only
461 * stop the watchdog when we have received the magic char (and nowayout
462 * was not set), else the watchdog will keep running.
471 * We only stop the watchdog if we received the magic character watchdog_release()
481 /* If the watchdog was not stopped, send a keepalive ping */ watchdog_release()
485 dev_crit(wdd->dev, "watchdog did not stop!\n"); watchdog_release()
493 /* make sure that /dev/watchdog can be re-opened */ watchdog_release()
513 .name = "watchdog",
518 * watchdog_dev_register: register a watchdog device
519 * @wdd: watchdog device
521 * Register a watchdog device including handling the legacy
522 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
538 pr_err("%s: a legacy watchdog module is probably present.\n", watchdog_dev_register()
553 pr_err("watchdog%d unable to add device %d:%d\n", watchdog_dev_register()
564 * watchdog_dev_unregister: unregister a watchdog device
565 * @watchdog: watchdog device
567 * Unregister the watchdog and if needed the legacy /dev/watchdog device.
585 * watchdog_dev_init: init dev part of watchdog core
587 * Allocate a range of chardev nodes to use for watchdog devices
592 int err = alloc_chrdev_region(&watchdog_devt, 0, MAX_DOGS, "watchdog"); watchdog_dev_init()
594 pr_err("watchdog: unable to allocate char dev region\n"); watchdog_dev_init()
599 * watchdog_dev_exit: exit dev part of watchdog core
601 * Release the range of chardev nodes used for watchdog devices
H A Driowd.c1 /* riowd.c - driver for hw watchdog inside Super I/O of RIO
14 #include <linux/watchdog.h>
23 * as its' watchdog.
25 * When the watchdog triggers, it asserts a line to the BBC (Boot Bus
31 * 0x05 (WDTO_INDEX) which is the watchdog time-out in minutes (1-255).
32 * If set to zero, this disables the watchdog. When set, the system
33 * must periodically (before watchdog expires) clear (set to zero) and
34 * re-set the watchdog else it will trigger.
36 * There are two other indexed watchdog registers inside this Super I/O
38 * the watchdog control and can be used to make the watchdog timer re-set
40 * index 0x07 is merely a sampling of the line from the watchdog to the
43 * The watchdog device generates no interrupts.
47 MODULE_DESCRIPTION("Hardware watchdog driver for Sun RIO");
48 MODULE_SUPPORTED_DEVICE("watchdog");
172 .name = "watchdog",
201 pr_err("Cannot register watchdog misc device\n"); riowd_probe()
205 pr_info("Hardware watchdog [%i minutes], regs at %p\n", riowd_probe()
H A Dwdrtas.c7 * RTAS watchdog driver
10 * device driver to exploit watchdog RTAS functions
39 #include <linux/watchdog.h>
49 MODULE_DESCRIPTION("RTAS watchdog driver");
72 /*** watchdog access functions */
75 * wdrtas_set_interval - sets the watchdog interval
80 * wdrtas_set_interval sets the watchdog keepalive interval by calling the
96 pr_err("setting the watchdog to %i timeout failed: %li\n", wdrtas_set_interval()
107 * wdrtas_get_interval - returns the current watchdog interval
112 * wdrtas_get_interval returns the current watchdog keepalive interval
131 pr_warn("could not get sp_spi watchdog timeout (%li). Continuing\n", wdrtas_get_interval()
141 * wdrtas_timer_start - starts watchdog
143 * wdrtas_timer_start starts the watchdog by calling the RTAS function
152 * wdrtas_timer_stop - stops watchdog
154 * wdrtas_timer_stop stops the watchdog timer by calling the RTAS function
163 * wdrtas_timer_keepalive - resets watchdog timer to keep system alive
165 * wdrtas_timer_keepalive restarts the watchdog timer by calling the
211 * wdrtas_get_status - returns the status of the watchdog
214 * include/linux/watchdog.h
225 * include/linux/watchdog.h, indicating why the watchdog rebooted the system
232 /*** watchdog API and operations stuff */
234 /* wdrtas_write - called when watchdog device is written to
244 * character 'V'. This character allows the watchdog device to be closed
275 * wdrtas_ioctl - ioctl function for the watchdog device
282 * wdrtas_ioctl implements the watchdog API ioctls
359 * wdrtas_open - open function of watchdog device
366 * function called when watchdog device is opened
383 * wdrtas_close - close function of watchdog device
393 /* only stop watchdog, if this was announced using 'V' before */ wdrtas_close()
470 * wdrtas_reboot stops the watchdog in case of a reboot
494 .name = "watchdog",
522 * this watchdog driver. It tolerates, if "get-sensor-state" and
540 pr_err("couldn't get token for set-indicator. Terminating watchdog code.\n"); wdrtas_get_tokens()
546 pr_err("couldn't get token for event-scan. Terminating watchdog code.\n"); wdrtas_get_tokens()
556 * wdrtas_register_devs unregisters the watchdog and temperature watchdog
571 * wdrtas_register_devs registers the watchdog and temperature watchdog
580 pr_err("couldn't register watchdog misc device. Terminating watchdog code.\n"); wdrtas_register_devs()
587 pr_warn("couldn't register watchdog temperature misc device. Continuing without temperature support.\n"); wdrtas_register_devs()
596 * wdrtas_init - init function of the watchdog driver
611 pr_err("could not register reboot notifier. Terminating watchdog code.\n"); wdrtas_init()
625 * wdrtas_exit - exit function of the watchdog driver
H A Dcoh901327_wdt.c11 #include <linux/watchdog.h>
78 * The watchdog block is of course always clocked, the
110 /* Enable the watchdog interrupt */ coh901327_enable()
112 /* Activate the watchdog timer */ coh901327_enable()
114 /* Start the watchdog timer */ coh901327_enable()
117 * Extra read so that this change propagate in the watchdog. coh901327_enable()
124 "%s(): watchdog not enabled! D2R value %04x\n", coh901327_enable()
133 /* Disable the watchdog interrupt if it is active */ coh901327_disable()
135 /* If the watchdog is currently enabled, attempt to disable it */ coh901327_disable()
150 "%s(): watchdog not disabled! D2R value %04x\n", coh901327_disable()
169 /* Feed the watchdog */ coh901327_ping()
208 * This interrupt occurs 10 ms before the watchdog WILL bark.
218 * when the system is about to watchdog-reset, add them here! coh901327_interrupt()
221 * to prevent a watchdog reset by feeding the watchdog at this coh901327_interrupt()
231 dev_crit(parent, "watchdog is barking!\n"); coh901327_interrupt()
314 "watchdog timed out since last chip reset!\n"); coh901327_probe()
345 /* Reset the watchdog */ coh901327_probe()
394 /* If watchdog is on, disable it here and now */ coh901327_suspend()
402 /* Restore the watchdog interrupt */ coh901327_resume()
405 /* Restart the watchdog timer */ coh901327_resume()
419 * Mistreating the watchdog is the only way to perform a software reset of the
428 * Timeout = 5s, we have to wait for the watchdog reset to coh901327_watchdog_reset()
429 * actually take place: the watchdog will be reloaded with the coh901327_watchdog_reset()
432 * The boot loader will typically deactivate the watchdog, so we coh901327_watchdog_reset()
434 * deactivating the watchdog before it is shut down by it. coh901327_watchdog_reset()
436 * NOTE: on future versions of the watchdog, this restriction is coh901327_watchdog_reset()
437 * gone: the watchdog will be reloaded with a default value (1 min) coh901327_watchdog_reset()
438 * instead of last value, and you can conveniently set the watchdog coh901327_watchdog_reset()
469 MODULE_ALIAS("platform:coh901327-watchdog");
H A Dintel-mid_wdt.c2 * intel-mid_wdt: generic Intel MID SCU watchdog driver
19 #include <linux/watchdog.h>
32 /* SCU watchdog messages */
54 * SCU expects the input size for watchdog IPC to wdt_start()
62 dev_crit(dev, "error starting watchdog: %d\n", ret); wdt_start()
88 dev_crit(dev, "Error stopping watchdog: 0x%x\n", ret); wdt_stop()
103 .identity = "Intel MID SCU watchdog",
146 IRQF_SHARED | IRQF_NO_SUSPEND, "watchdog", mid_wdt_probe()
156 dev_err(&pdev->dev, "error registering watchdog device\n"); mid_wdt_probe()
160 dev_info(&pdev->dev, "Intel MID watchdog device probed\n"); mid_wdt_probe()
H A Dw83977f_wdt.c28 #include <linux/watchdog.h>
48 static int timeoutW; /* timeout in watchdog counter units */
68 * Start the watchdog
82 * Select device Aux2 (device=8) to set watchdog regs F2, F3 and F4. wdt_start()
83 * F2 has the timeout in watchdog counter units. wdt_start()
84 * F3 is set to enable watchdog LED blink at timeout. wdt_start()
101 * Select device Aux1 (dev=7) to set GP16 as the watchdog output wdt_start()
102 * (in reg E6) and GP13 as the watchdog LED output (in reg E3). wdt_start()
105 * check watchdog LED on SBC. wdt_start()
139 * Stop the watchdog
153 * Select device Aux2 (device=8) to set watchdog regs F2, F3 and F4. wdt_stop()
154 * F2 is reset to its default value (watchdog timer disabled). wdt_stop()
193 * Send a keepalive ping to the watchdog
207 /* Select device Aux2 (device=8) to kick watchdog reg F2 */ wdt_keepalive()
222 * Set the watchdog timeout value
230 * Convert seconds to watchdog counter time units, rounding up. wdt_set_timeout()
231 * On PCM-5335 watchdog units are 30 seconds/step with 15 sec startup wdt_set_timeout()
246 * timeoutW is the timeout in watchdog counter units. wdt_set_timeout()
254 * Get the watchdog status
268 /* Select device Aux2 (device=8) to read watchdog reg F4 */ wdt_get_status()
288 * /dev/watchdog handling
293 /* If the watchdog is alive we don't need to start it again */ wdt_open()
315 pr_crit("unexpected close, not stopping watchdog!\n"); wdt_release()
323 * @file: file handle to the watchdog
328 * A write to a watchdog device is defined as a keepalive signal. Any
365 * @cmd: watchdog command
368 * The watchdog API defines a common set of functions for all watchdogs
460 .name = "watchdog",
528 MODULE_DESCRIPTION("Driver for watchdog timer in W83977F I/O chip");
H A Dwatchdog_core.c10 * by all the watchdog timer drivers.
35 #include <linux/watchdog.h> /* For watchdog specific items */
49 * Sometimes watchdog drivers needs to be loaded as soon as possible,
51 * raising the initcall level of the watchdog driver is a solution.
53 * watchdog_core need miscdev to register the watchdog as a char device.
55 * The deferred registration infrastructure offer a way for the watchdog
56 * subsystem to register a watchdog properly, even before miscdev is ready.
161 /* Use alias for watchdog id if possible */ __watchdog_register_device()
163 ret = of_alias_get_id(wdd->parent->of_node, "watchdog"); __watchdog_register_device()
182 /* Retry in case a legacy watchdog module exists */ __watchdog_register_device()
197 NULL, "watchdog%d", wdd->id); __watchdog_register_device()
209 * watchdog_register_device() - register a watchdog device
210 * @wdd: watchdog device
212 * Register a watchdog device with the kernel so that the
213 * watchdog timer can be accessed from userspace.
244 pr_err("error unregistering /dev/watchdog (err=%d)\n", ret); __watchdog_unregister_device()
251 * watchdog_unregister_device() - unregister a watchdog device
252 * @wdd: watchdog device to unregister
254 * Unregister a watchdog device that was previously successfully
290 watchdog_class = class_create(THIS_MODULE, "watchdog"); watchdog_init()
H A Dalim1535_wdt.c16 #include <linux/watchdog.h>
50 * ali_start - start watchdog countdown
73 * Stop the ALi watchdog countdown
91 * ali_keepalive - send a keepalive to the watchdog
126 * /dev/watchdog handling
130 * ali_write - writes to ALi watchdog
136 * Handle a write to the ALi watchdog. Writing to the file pings
137 * the watchdog and resets it. Writing the magic 'V' sequence allows
138 * the next close to turn off the watchdog.
171 * ali_ioctl - handle watchdog ioctls
176 * Handle the watchdog ioctls supported by the ALi driver. Really
236 * ali_open - handle open of ali watchdog
240 * Open the ALi watchdog device. Ensure only one person opens it
241 * at a time. Also start the watchdog running.
246 /* /dev/watchdog can only be opened once */ ali_open()
256 * ali_release - close an ALi watchdog
260 * Close the ALi watchdog device. Actual shutdown of the timer
272 pr_crit("Unexpected close, not stopping watchdog!\n"); ali_release()
315 * watchdog device. This may be overtight but it is better to be safe
375 .name = "watchdog",
386 * Scan for a suitable watchdog and if so initialize it. Return an error
394 /* Check whether or not the hardware watchdog is there */ watchdog_init()
406 /* Calculate the watchdog's timeout */ watchdog_init()
435 * Called while unloading a successfully installed watchdog module.
H A Ddiag288_wdt.c4 * Under z/VM, expiration of the watchdog will send a "system restart" command
10 * On LPAR, the watchdog will always trigger a system restart. the module
29 #include <linux/watchdog.h>
50 /* Action codes for LPAR watchdog */
64 MODULE_PARM_DESC(cmd, "CP command that is run when the watchdog triggers (z/VM only)");
67 MODULE_PARM_DESC(conceal, "Enable the CONCEAL CP option while the watchdog is active (z/VM only)");
137 pr_err("The watchdog cannot be activated\n"); wdt_start()
171 * retrigger the watchdog. On LPAR WDT_FUNC_CHANGE must wdt_ping()
172 * be used when the watchdog is running. wdt_ping()
185 pr_err("The watchdog timer cannot be started or reset\n"); wdt_ping()
220 * It makes no sense to go into suspend while the watchdog is running.
221 * Depending on the memory size, the watchdog might trigger, while we
223 * We reuse the open flag to ensure that suspend and watchdog open are
229 pr_err("Linux cannot be suspended while the watchdog is in use\n"); wdt_suspend()
234 pr_err("Linux cannot be suspended while the watchdog is in use\n"); wdt_suspend()
277 pr_err("The watchdog cannot be initialized\n"); diag288_init()
282 pr_err("The watchdog cannot be initialized\n"); diag288_init()
288 pr_err("The watchdog cannot be deactivated\n"); diag288_init()
H A Dvia_wdt.c10 * Caveat: PnP must be enabled in BIOS to allow full access to watchdog
11 * control registers. If not, the watchdog must be configured in BIOS manually.
22 #include <linux/watchdog.h>
26 #define VIA_WDT_CONF 0xec /* watchdog enable state */
29 #define VIA_WDT_CONF_ENABLE 0x01 /* 1: enable watchdog */
30 #define VIA_WDT_CONF_MMIO 0x02 /* 1: enable watchdog MMIO */
42 #define VIA_WDT_FIRED 0x02 /* 1: restarted by expired watchdog */
72 /* The timer that pings the watchdog */
83 * Timer tick: the timer will make sure that the watchdog timer hardware
85 * 1) the watchog timer has been started and /dev/watchdog is open
89 * 2) the watchdog timer has been stopped by userspace.
136 .identity = "VIA watchdog",
170 * Allocate a MMIO region which contains watchdog control register wdt_probe()
171 * and counter, then configure the watchdog to use this region. wdt_probe()
173 * If not, the watchdog must be configured in BIOS manually. wdt_probe()
188 dev_info(&pdev->dev, "VIA Chipset watchdog MMIO: %x\n", mmio); wdt_probe()
218 /* start triggering, in case of watchdog already enabled by BIOS */ wdt_probe()
260 MODULE_DESCRIPTION("Driver for watchdog timer on VIA chipset");
H A Dscx200_wdt.c1 /* drivers/char/watchdog/scx200_wdt.c
26 #include <linux/watchdog.h>
47 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
55 #define W_ENABLE 0x00fa /* Enable watchdog */
56 #define W_DISABLE 0x0000 /* Disable watchdog */
76 pr_debug("enabling watchdog timer, wdto_restart = %d\n", wdto_restart); scx200_wdt_enable()
89 pr_debug("disabling watchdog timer\n"); scx200_wdt_disable()
111 pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); scx200_wdt_release()
212 .name = "watchdog",
229 pr_warn("watchdog I/O region busy\n"); scx200_wdt_init()
H A Dks8695_wdt.c23 #include <linux/watchdog.h>
39 #define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */
64 * Disable the watchdog.
78 * Enable and reset the watchdog.
100 * Reload the watchdog timer. (ie, pat the watchdog)
115 * Change the watchdog time interval.
128 /* Set new watchdog time. It will be used when ks8695_wdt_settimeout()
137 * Watchdog device is opened, and watchdog starts running.
149 * Close the watchdog device.
150 * If CONFIG_WATCHDOG_NOWAYOUT is NOT defined then the watchdog is also
155 /* Disable the watchdog when file is closed */ ks8695_wdt_close()
163 .identity = "ks8695 watchdog",
193 ks8695_wdt_reload(); /* pat the watchdog */ ks8695_wdt_ioctl()
212 * Pat the watchdog whenever device is written to.
217 ks8695_wdt_reload(); /* pat the watchdog */ ks8695_wdt_write()
234 .name = "watchdog",
H A Dsmsc37b787_wdt.c30 * via the /dev/watchdog special device file that userspace is
32 * occurs, the driver will usually tell the hardware watchdog
33 * that everything is in order, and that the watchdog should wait
36 * notifications cease to occur, and the hardware watchdog will
40 * mknod /dev/watchdog c 10 130
43 * Documentation/watchdog/wdt.txt
52 #include <linux/watchdog.h>
86 static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
215 /* initialize watchdog */
225 /* enable the watchdog */ wb_smsc_wdt_initialize()
243 /* set the watchdog timer units */ wb_smsc_wdt_initialize()
250 /* shutdown the watchdog */
258 /* disable the watchdog */ wb_smsc_wdt_shutdown()
262 /* reset watchdog config register */ wb_smsc_wdt_shutdown()
265 /* reset watchdog control register */ wb_smsc_wdt_shutdown()
275 /* set timeout => enable watchdog */
309 /* disable watchdog */
313 /* set the timeout to 0 to disable the watchdog */ wb_smsc_wdt_disable()
317 /* enable watchdog by setting the current timeout */
341 /* return, if the watchdog is enabled (timeout is set...) */
351 /* open => enable watchdog and set initial timeout */
355 /* /dev/watchdog can only be opened once */ wb_smsc_wdt_open()
382 pr_crit("Unexpected close, not stopping watchdog!\n"); wb_smsc_wdt_release()
522 .name = "watchdog",
534 pr_info("SMsC 37B787 watchdog component driver " wb_smsc_wdt_init()
537 if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) { wb_smsc_wdt_init()
547 /* init the watchdog timer */ wb_smsc_wdt_init()
595 pr_info("SMsC 37B787 watchdog component driver removed\n"); wb_smsc_wdt_exit()
602 MODULE_DESCRIPTION("Driver for SMsC 37B787 watchdog component (Version "
H A Dat91rm9200_wdt.c30 #include <linux/watchdog.h>
80 * Disable the watchdog.
88 * Enable and reset the watchdog.
98 * Reload the watchdog timer. (ie, pat the watchdog)
108 * Watchdog device is opened, and watchdog starts running.
120 * Close the watchdog device.
121 * If CONFIG_WATCHDOG_NOWAYOUT is NOT defined then the watchdog is also
126 /* Disable the watchdog when file is closed */ at91_wdt_close()
135 * Change the watchdog time interval.
148 /* Set new watchdog time. It will be used when at91_wdt_settimeout()
155 .identity = "at91 watchdog",
185 at91_wdt_reload(); /* pat the watchdog */ at91_wdt_ioctl()
204 * Pat the watchdog whenever device is written to.
209 at91_wdt_reload(); /* pat the watchdog */ at91_wdt_write()
226 .name = "watchdog",
H A Dgef_wdt.c2 * GE watchdog userspace interface
13 * Based on: mv64x60_wdt.c (MV64X60 watchdog userspace interface)
21 * This driver currently can only support 1 watchdog - there are 2 in the
23 * process-based watchdog (via /dev/watchdog), the second (using the interrupt
24 * capabilities) a kernel-based watchdog.
34 #include <linux/watchdog.h>
45 * The watchdog configuration register contains a pair of 2-bit fields,
49 * enabling and disabling the watchdog timer.
51 * watchdog timer is currently enabled.
116 pr_notice("watchdog activated\n"); gef_wdt_handler_enable()
124 pr_notice("watchdog deactivated\n"); gef_wdt_handler_disable()
172 .identity = "GE watchdog", gef_wdt_ioctl()
261 .name = "watchdog",
319 pr_info("GE watchdog driver\n"); gef_wdt_init()
332 MODULE_DESCRIPTION("GE watchdog driver");
H A Dwdt.c22 * Alan Cox : Added the watchdog ioctl() stuff
42 #include <linux/watchdog.h>
118 * Start the watchdog driver.
125 inb_p(WDT_DC); /* Disable watchdog */ wdt_start()
135 outb_p(0, WDT_DC); /* Enable watchdog */ wdt_start()
143 * Stop the watchdog driver.
151 inb_p(WDT_DC); /* Disable watchdog */ wdt_stop()
160 * Reload counter one with the watchdog heartbeat. We don't bother
168 /* Write a watchdog value */ wdt_ping()
169 inb_p(WDT_DC); /* Disable watchdog */ wdt_ping()
173 outb_p(0, WDT_DC); /* Enable watchdog */ wdt_ping()
181 * Set a new heartbeat value for the watchdog device. If the heartbeat
199 * Extract the status information from a WDT watchdog device. There are
312 * @file: file handle to the watchdog
317 * A write to a watchdog device is defined as a keepalive signal. Any
347 * @cmd: watchdog command
350 * The watchdog API defines a common set of functions for all watchdogs
409 * The watchdog device has been opened. The watchdog device is single
432 * The watchdog has a configurable API. There is a religious dispute
433 * between people who want their watchdog to be able to shut down and
434 * those who want to be sure if the watchdog manager dies the machine
454 * @file: file handle to the watchdog board
536 .name = "watchdog",
566 * Unload the watchdog. You cannot do this with any file handles open.
567 * If your watchdog is set to continue ticking on close and you unload
586 * Set up the WDT watchdog board. All we have to do is grab the
666 MODULE_DESCRIPTION("Driver for ISA ICS watchdog cards (WDT500/501)");
H A Dwdt977.c36 #include <linux/watchdog.h>
77 * Start the watchdog
90 /* select device Aux2 (device=8) and set watchdog regs F2, F3 and F4 wdt977_start()
107 * watchdog output. In test mode watch the bit 1 on F4 to wdt977_start()
127 * Stop the watchdog
139 /* select device Aux2 (device=8) and set watchdog regs F2,F3 and F4 wdt977_stop()
156 GP16 as a watchdog output */ wdt977_stop()
172 * Send a keepalive ping to the watchdog
185 /* select device Aux2 (device=8) and kicks watchdog reg F2 */ wdt977_keepalive()
200 * Set the watchdog timeout value
229 * Get the watchdog status
243 /* select device Aux2 (device=8) and read watchdog reg F4 */ wdt977_get_status()
263 * /dev/watchdog handling
268 /* If the watchdog is alive we don't need to start it again */ wdt977_open()
290 pr_crit("Unexpected close, not stopping watchdog!\n"); wdt977_release()
299 * @file: file handle to the watchdog
304 * A write to a watchdog device is defined as a keepalive signal. Any
345 * @cmd: watchdog command
348 * The watchdog API defines a common set of functions for all watchdogs
435 .name = "watchdog",
H A Dorion_wdt.c2 * drivers/watchdog/orion_wdt.c
20 #include <linux/watchdog.h>
108 /* Setup watchdog input clock */ armada370_wdt_clock_init()
171 /* Enable the fixed watchdog clock input */ armadaxp_wdt_clock_init()
183 /* Reload watchdog duration */ orion_wdt_ping()
194 /* Set watchdog duration */ armada375_start()
198 /* Clear the watchdog expiration bit */ armada375_start()
201 /* Enable watchdog timer */ armada375_start()
205 /* Enable reset on watchdog */ armada375_start()
219 /* Set watchdog duration */ armada370_start()
223 /* Clear the watchdog expiration bit */ armada370_start()
226 /* Enable watchdog timer */ armada370_start()
230 /* Enable reset on watchdog */ armada370_start()
241 /* Set watchdog duration */ orion_start()
245 /* Enable watchdog timer */ orion_start()
249 /* Enable reset on watchdog */ orion_start()
268 /* Disable reset on watchdog */ orion_stop()
271 /* Disable watchdog timer */ orion_stop()
282 /* Disable reset on watchdog */ armada375_stop()
289 /* Disable watchdog timer */ armada375_stop()
300 /* Disable reset on watchdog */ armada370_stop()
305 /* Disable watchdog timer */ armada370_stop()
577 * Let's make sure the watchdog is fully stopped, unless it's orion_wdt_probe()
580 * set a running watchdog before booting the kernel. orion_wdt_probe()
585 /* Request the IRQ only after the watchdog is disabled */ orion_wdt_probe()
590 * watchdog, so let's make it optional. orion_wdt_probe()
648 MODULE_PARM_DESC(heartbeat, "Initial watchdog heartbeat in seconds");
H A Ddw_wdt.c10 * This file implements a driver for the Synopsys DesignWare watchdog device
11 * in the many subsystems. The watchdog has 16 different timeout periods
14 * The DesignWare watchdog cannot be stopped once it has been started so we
15 * use a software timer to implement a ping that will keep the watchdog alive.
16 * If we receive an expected close for the watchdog then we keep the timer
17 * running, otherwise the timer is stopped and the watchdog will expire.
40 #include <linux/watchdog.h>
50 /* The maximum TOP (timeout period) value that can be set in the watchdog. */
82 * cycles is 2 ^ (16 + i) and the watchdog counts down. dw_wdt_top_in_seconds()
120 * Set the new value in the watchdog. Some versions of dw_wdt dw_wdt_set_top()
123 * effectively get a pat of the watchdog right here. dw_wdt_set_top()
129 * Add an explicit pat to handle versions of the watchdog that dw_wdt_set_top()
180 * The watchdog is not currently enabled. Set the timeout to dw_wdt_open()
284 pr_crit("watchdog cannot be disabled, system will reboot soon\n"); dw_wdt_release()
326 .name = "watchdog",
H A DiTCO_vendor_support.c2 * intel TCO vendor specific watchdog driver support
66 * This setting enables SMI to clear the watchdog expired flag.
68 * reboot. When application starts to use watchdog function,
75 * So, if the watchdog timer is 20 seconds, then the maximum hang
86 val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ supermicro_old_pre_start()
87 outl(val32, smires->start); /* Needed to activate watchdog */ supermicro_old_pre_start()
96 val32 |= 0x00002000; /* Turn on SMI clearing watchdog */ supermicro_old_pre_stop()
97 outl(val32, smires->start); /* Needed to deactivate watchdog */ supermicro_old_pre_stop()
115 * default watchdog timer is set to be 5 minutes (about 4m35s). It is
117 * to take over the control once OS is running up and before watchdog
124 * prevents user enables watchdog in BIOS by accident.
133 * watchdog timer on these machines, as a result they reboot after five
137 * BIOS to avoid a "boot-race"... This driver will enable watchdog
138 * functionality even if it's disabled in the BIOS once the /dev/watchdog
170 /* Switch to watchdog control page */ supermicro_new_unlock_watchdog()
202 /* enable watchdog by setting bit 0 of Watchdog Enable to 1 */ supermicro_new_pre_start()
217 /* disable watchdog by setting bit 0 of Watchdog Enable to 0 */ supermicro_new_pre_stop()
230 /* reset watchdog timeout to heartveat value */ supermicro_new_pre_set_heartbeat()
244 * and does not reload the time. Thus the TCO watchdog does not reboot
H A Dts72xx_wdt.c4 * glue logic CPLD chip, which includes programmable watchdog
24 #include <linux/watchdog.h>
39 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
42 * struct ts72xx_wdt - watchdog control structure
44 * @regval: watchdog timeout value suitable for control register
45 * @flags: flags controlling watchdog device state
46 * @control_reg: watchdog control register
47 * @feed_reg: watchdog feed register
71 * 0x00 watchdog disabled
101 * be programmed into watchdog control register. When conversion is
139 * ts72xx_wdt_kick() - kick the watchdog
140 * @wdt: watchdog to be kicked
150 * ts72xx_wdt_start() - starts the watchdog timer
151 * @wdt: watchdog to be started
153 * This function programs timeout to watchdog timer
170 * ts72xx_wdt_stop() - stops the watchdog timer
171 * @wdt: watchdog to be stopped
386 .name = "watchdog",
415 /* make sure that the watchdog is disabled */ ts72xx_wdt_probe()
H A Dda9052_wdt.c20 #include <linux/watchdog.h>
72 dev_err(da9052->dev, "Failed to disable watchdog bit, %d\n", da9052_wdt_set_timeout()
139 * We have a minimum time for watchdog window called TWDMIN. A write da9052_wdt_ping()
140 * to the watchdog before this elapsed time should cause an error. da9052_wdt_ping()
146 /* Reset the watchdog timer */ da9052_wdt_ping()
153 * FIXME: Reset the watchdog core, in general PMIC da9052_wdt_ping()
206 dev_err(&pdev->dev, "Failed to disable watchdog bits, %d\n", da9052_wdt_probe()
237 .name = "da9052-watchdog",
246 MODULE_ALIAS("platform:da9052-watchdog");
H A Ddavinci_wdt.c2 * drivers/char/watchdog/davinci_wdt.c
18 #include <linux/watchdog.h>
63 * @wdd - hold watchdog device as is in WDT core
82 /* reset timer, set mode to 64-bit watchdog, and unreset */ davinci_wdt_start()
100 /* put watchdog in pre-active state */ davinci_wdt_start()
102 /* put watchdog in active state */ davinci_wdt_start()
111 /* put watchdog in service state */ davinci_wdt_ping()
113 /* put watchdog in active state */ davinci_wdt_ping()
198 dev_err(dev, "cannot register watchdog device\n"); davinci_wdt_probe()
H A Drn5t618_wdt.c18 #include <linux/watchdog.h>
26 MODULE_PARM_DESC(timeout, "Initial watchdog timeout in seconds");
39 * watchdog expiration times. If the watchdog is not accessed before
92 /* enable watchdog */ rn5t618_wdt_start()
99 /* enable watchdog interrupt */ rn5t618_wdt_start()
119 /* The counter is restarted after a R/W access to watchdog register */ rn5t618_wdt_ping()
128 /* Clear pending watchdog interrupt */ rn5t618_wdt_ping()
197 MODULE_DESCRIPTION("RN5T618 watchdog driver");
H A Dbooke_wdt.c19 #include <linux/watchdog.h>
25 /* If the kernel parameter wdt=1, the watchdog will be enabled at boot.
26 * Also, the wdt_period sets the watchdog timer period timeout.
28 * trigger a watchog timeout. This watchdog timeout will occur 3 times, the
29 * first time nothing will happen, the second time a watchdog exception will
50 * corresponding to the reset time. There will be a watchdog
140 /* clear status before enabling watchdog */ __booke_wdt_enable()
150 * booke_wdt_disable - disable the watchdog on the given CPU
152 * This function is called on each CPU. It disables the watchdog on that CPU.
155 * effectively disable the watchdog by setting its period to the maximum value.
173 pr_debug("watchdog enabled (timeout = %u sec)\n", wdog->timeout); booke_wdt_start()
181 pr_debug("watchdog disabled\n"); booke_wdt_stop()
224 pr_info("powerpc book-e watchdog driver loaded\n"); booke_wdt_init()
242 MODULE_DESCRIPTION("PowerPC Book-E watchdog driver");
H A Deurotechwdt.c44 * The eurotech CPU-1220/1410/1420's watchdog is a part
55 #include <linux/watchdog.h>
182 * Reload counter one with the watchdog timeout.
187 /* Write the watchdog default value */ eurwdt_ping()
193 * @file: file handle to the watchdog
198 * A write to a watchdog device is defined as a keepalive signal. Any
229 * @cmd: watchdog command
232 * The watchdog API defines a common set of functions for all watchdogs
308 * The misc device has been opened. The watchdog device is single
327 * The watchdog has a configurable API. There is a religious dispute
328 * between people who want their watchdog to be able to shut down and
329 * those who want to be sure if the watchdog manager dies the machine
339 pr_crit("Unexpected close, not stopping watchdog!\n"); eurwdt_release()
384 .name = "watchdog",
400 * Unload the watchdog. You cannot do this with any file handles open.
401 * If your watchdog is set to continue ticking on close and you unload
421 * Set up the WDT watchdog board. After grabbing the resources
478 MODULE_DESCRIPTION("Driver for Eurotech CPU-1220/1410 on board watchdog");
H A Dimx2_wdt.c38 #include <linux/watchdog.h>
65 struct timer_list timer; /* Pings the watchdog when closed */
82 .identity = "imx2+ watchdog",
120 /* Strip the old watchdog Time-Out value */ imx2_wdt_setup()
126 /* Set the watchdog's Time-Out value */ imx2_wdt_setup()
131 /* enable the watchdog */ imx2_wdt_setup()
181 /* delete the timer that pings the watchdog after close */ imx2_wdt_start()
194 * We use a timer to ping the watchdog while /dev/watchdog is closed imx2_wdt_stop()
285 * Disable the watchdog power down counter at boot. Otherwise the power imx2_wdt_probe()
293 dev_err(&pdev->dev, "cannot register watchdog device\n"); imx2_wdt_probe()
348 /* Disable watchdog if it is active or non-active but still running */ imx2_wdt_suspend()
354 /* The watchdog IP block is running */ imx2_wdt_suspend()
359 /* The watchdog is not active */ imx2_wdt_suspend()
369 /* Enable watchdog and configure it if necessary */ imx2_wdt_resume()
382 * If the watchdog is still active and resumes imx2_wdt_resume()
384 * watchdog again. imx2_wdt_resume()
394 * But the watchdog is not active, then start imx2_wdt_resume()
H A Dimgpdc_wdt.c10 * Based on drivers/watchdog/sunxi_wdt.c Copyright (c) 2013 Carlo Caione
23 * Therefore, the hardware only allows to program watchdog timeouts, expressed
24 * as a power of two number of watchdog clock cycles. The current implementation
25 * guarantees that the actual watchdog timeout will be _at least_ the value
29 * to the actual hardware timeout (watchdog clock @ 40000 Hz):
38 * Albeit coarse, this granularity would suffice most watchdog uses.
39 * If the platform allows it, the user should be able to change the watchdog
50 #include <linux/watchdog.h>
140 /* Start the watchdog timer (delay should already be set) */ pdc_wdt_start()
264 "watchdog module last reset due to timeout\n"); pdc_wdt_probe()
268 "watchdog module last reset due to hard reset\n"); pdc_wdt_probe()
272 "watchdog module last reset due to soft reset\n"); pdc_wdt_probe()
276 "watchdog module last reset due to user reset\n"); pdc_wdt_probe()
H A Dpika_wdt.c18 #include <linux/watchdog.h>
54 struct timer_list timer; /* The timer that pings the watchdog */
66 * Reload the watchdog timer. (ie, pat the watchdog)
71 * Bit 7, WTCHDG_EN: When set to 1, the watchdog timer is enabled. pikawdt_reset()
72 * Once enabled, it cannot be disabled. The watchdog can be pikawdt_reset()
75 * Bit 8-11, WTCHDG_TIMEOUT_SEC: Sets the watchdog timeout value in pikawdt_reset()
111 * Watchdog device is opened, and watchdog starts running.
115 /* /dev/watchdog can only be opened once */ pikawdt_open()
125 * Close the watchdog device.
139 * Pat the watchdog whenever device is written to.
220 .name = "watchdog",
263 * Bit 31, WDOG: Set to 1 when the last reset was caused by a watchdog pikawdt_init()
H A Dda9055_wdt.c20 #include <linux/watchdog.h>
92 * We have a minimum time for watchdog window called TWDMIN. A write da9055_wdt_ping()
93 * to the watchdog before this elapsed time will cause an error. da9055_wdt_ping()
97 /* Reset the watchdog timer */ da9055_wdt_ping()
172 dev_err(&pdev->dev, "Failed to stop watchdog, %d\n", ret); da9055_wdt_probe()
201 .name = "da9055-watchdog",
208 MODULE_DESCRIPTION("DA9055 watchdog");
210 MODULE_ALIAS("platform:da9055-watchdog");
H A Dwdt285.c2 * Intel 21285 watchdog driver
28 #include <linux/watchdog.h>
41 * Define this to stop the watchdog actually rebooting the machine.
90 ret = request_irq(IRQ_TIMER4, watchdog_fire, 0, "watchdog", NULL); watchdog_open()
98 * no way to disable the watchdog. watchdog_open()
110 * Note: if we really have enabled the watchdog, there
195 .name = "watchdog",
224 MODULE_DESCRIPTION("Footbridge watchdog driver");
H A Dintel_scu_watchdog.c33 #include <linux/watchdog.h>
77 /* After watchdog device is closed, check force_boot. If:
78 * force_boot == 0, then force boot on next watchdog interrupt after close,
85 "the system immediately if the /dev/watchdog device is closed"
86 "A value of 0 means that when /dev/watchdog device is closed"
87 "the watchdog timer will be refreshed for one more interval"
89 "watchdog timer will reset the system."
108 pr_crit("System will reset when watchdog timer times out!\n"); watchdog_fire()
145 pr_err("Error setting SCU watchdog timer: %x\n", ipc_ret); watchdog_set_ipc()
234 /* watchdog timing come out right. */ intel_scu_set_heartbeat()
248 /* Make sure the watchdog timer is stopped */ intel_scu_set_heartbeat()
293 * /dev/watchdog handling
299 /* Set flag to indicate that watchdog device is open */ intel_scu_open()
313 * This watchdog should not be closed, after the timer intel_scu_release()
316 * immediate reset. If force_boot is not set, the watchdog intel_scu_release()
318 * of that interval, the watchdog timer will reset the system. intel_scu_release()
332 pr_crit("Unexpected close of /dev/watchdog!\n"); intel_scu_release()
357 /* Start watchdog with timer value set by init */ intel_scu_write()
418 /* Turn off the watchdog timer. */ intel_scu_notify_sys()
444 * If it isn't an intel MID device then it doesn't have this watchdog intel_scu_watchdog_init()
515 watchdog_device.miscdev.name = "watchdog"; intel_scu_watchdog_init()
527 IRQF_SHARED, "watchdog", intel_scu_watchdog_init()
H A Dat91sam9_wdt.c31 #include <linux/watchdog.h>
48 /* AT91SAM9 watchdog runs a 12bit counter @ 256Hz,
49 * use this to convert a watchdog
88 struct timer_list timer; /* The timer that pings the watchdog */
113 * Reload the watchdog timer. (ie, pat the watchdog)
145 /* The watchdog timer hardware can not be stopped... */ at91_wdt_stop()
177 dev_err(dev, "watchdog is disabled\n"); at91_wdt_init()
195 * Try to reset the watchdog counter 4 or 2 times more often than at91_wdt_init()
196 * actually requested, to avoid spurious watchdog reset. at91_wdt_init()
222 "watchdog already configured differently (mr = %x expecting %x)\n", at91_wdt_init()
228 * Use min_heartbeat the first time to avoid spurious watchdog reset: at91_wdt_init()
229 * we don't know for how long the watchdog counter is running, and at91_wdt_init()
230 * - resetting it right now might trigger a watchdog fault reset at91_wdt_init()
231 * - waiting for heartbeat time might lead to a watchdog timeout at91_wdt_init()
297 if (!of_property_read_string(np, "atmel,watchdog-type", &tmp) && of_at91wdt_init()
H A Dstmp3xxx_rtc_wdt.c2 * Watchdog driver for the RTC based watchdog in STMP3xxx and i.MX23/28
14 #include <linux/watchdog.h>
83 dev_err(&pdev->dev, "cannot register watchdog device\n"); stmp3xxx_wdt_probe()
87 dev_info(&pdev->dev, "initialized watchdog with heartbeat %ds\n", stmp3xxx_wdt_probe()
H A Dmv64x60_wdt.c2 * mv64x60_wdt.c - MV64X60 (Marvell Discovery) watchdog userspace interface
8 * and services the watchdog.
25 #include <linux/watchdog.h>
34 * The watchdog configuration register contains a pair of 2-bit fields,
38 * enabling and disabling the watchdog timer.
40 * watchdog timer is currently enabled.
105 pr_notice("watchdog activated\n"); mv64x60_wdt_handler_enable()
113 pr_notice("watchdog deactivated\n"); mv64x60_wdt_handler_disable()
188 .identity = "MV64x60 watchdog", mv64x60_wdt_ioctl()
252 .name = "watchdog",
309 pr_info("MV64x60 watchdog driver\n"); mv64x60_wdt_init()
323 MODULE_DESCRIPTION("MV64x60 watchdog driver");
H A Dpc87413_wdt.c26 #include <linux/watchdog.h>
152 /* Set watchdog timeout to x minutes */
219 /* Enable the watchdog */
234 /* Disable the watchdog */
248 /* Refresh the watchdog */
276 /* /dev/watchdog can only be opened once */ pc87413_open()
297 * The watchdog has a configurable API. There is a religious dispute
298 * between people who want their watchdog to be able to shut down and
299 * those who want to be sure if the watchdog manager dies the machine
312 pr_crit("Unexpected close, not stopping watchdog!\n"); pc87413_release()
323 * return, if the watchdog is enabled (timeout is set...)
334 * @file: file handle to the watchdog
339 * A write to a watchdog device is defined as a keepalive signal. Any
374 * @cmd: watchdog command
377 * The watchdog API defines a common set of functions for all watchdogs
397 .identity = "PC87413(HF/F) watchdog", pc87413_ioctl()
490 .name = "watchdog",
499 * Set up the WDT watchdog board. All we have to do is grab the
552 * Unload the watchdog. You cannot do this with any file handles open.
553 * If your watchdog is set to continue ticking on close and you unload
571 pr_info("watchdog component driver removed\n"); pc87413_exit()
H A Dit87_wdt.c14 * Support of the watchdog timers, which are available on
43 #include <linux/watchdog.h>
262 /* watchdog timer handling */
318 * wdt_set_timeout - set a new timeout value with watchdog ioctl
321 * The hardware device has a 8 or 16 bit watchdog timer (depends on
324 * Used within WDIOC_SETTIMEOUT watchdog device ioctl.
350 * wdt_get_status - determines the status supported by watchdog ioctl
354 * between a regular system reset and a watchdog forced reset.
356 * WDIOC_GETSTATUS watchdog ioctl. Additionally the driver
359 * Used within WDIOC_GETSTATUS watchdog device ioctl.
386 /* /dev/watchdog handling */
389 * wdt_open - watchdog file_operations .open
393 * The watchdog timer starts by opening the device.
395 * Used within the file operation of the watchdog device.
419 * wdt_release - watchdog file_operations .release
423 * Closing the watchdog device either stops the watchdog timer
425 * wasn't written, a critical warning about an running watchdog
428 * Used within the file operation of the watchdog device.
438 * Stop failed. Just keep the watchdog alive wdt_release()
448 pr_crit("unexpected close, not stopping watchdog!\n"); wdt_release()
456 * wdt_write - watchdog file_operations .write
457 * @file: file handle to the watchdog
462 * A write to a watchdog device is defined as a keepalive signal. Any
465 * Used within the file operation of the watchdog device.
497 * wdt_ioctl - watchdog file_operations .unlocked_ioctl
499 * @cmd: watchdog command
502 * The watchdog API defines a common set of functions for all watchdogs
505 * Used within the file operation of the watchdog device.
597 .name = "watchdog",
H A Dat32ap700x_wdt.c13 * A watchdog timer event will, after reset, block writes to the WDT_CLEAR
31 #include <linux/watchdog.h>
89 * Disable the watchdog.
103 * Enable and reset the watchdog.
121 * Pat the watchdog timer.
131 * Watchdog device is opened, and watchdog starts running.
143 * Close the watchdog device.
151 "unexpected close, not stopping watchdog!\n"); at32_wdt_close()
160 * Change the watchdog time interval.
172 * Set new watchdog time. It will be used when at32_wdt_start() is at32_wdt_settimeout()
180 * Get the watchdog status.
207 .identity = "at32ap700x watchdog",
293 /* someone wrote to us, we should pat the watchdog */ at32_wdt_write()
339 /* Work-around for watchdog silicon errata. */ at32_wdt_probe()
350 wdt->miscdev.name = "watchdog"; at32_wdt_probe()
H A Dbfin_wdt.c22 #include <linux/watchdog.h>
61 * The Userspace watchdog got a KeepAlive: schedule the next timeout.
73 * Stops the on-chip watchdog.
85 * Starts the on-chip watchdog. Automatically loads WDOG_CNT
98 * See if the watchdog is running.
180 pr_crit("Unexpected close, not stopping watchdog!\n"); bfin_wdt_release()
195 * Pings the watchdog on write.
226 * @cmd: watchdog command
230 * watchdog API.
291 * bfin_wdt_suspend - suspend the watchdog
295 * Remember if the watchdog was running and stop it.
297 * standard in the watchdog world ...
310 * bfin_wdt_resume - resume the watchdog
313 * If the watchdog was running, turn it back on.
342 .name = "watchdog",
H A Dwdt_pci.c22 * Alan Cox : Added the watchdog ioctl() stuff
47 #include <linux/watchdog.h>
61 /* We can only use 1 card due to the /dev/watchdog restriction */
122 * Start the watchdog driver.
132 * "pet" the watchdog, as Access says. wdtpci_start()
135 inb(WDT_DC); /* Disable watchdog */ wdtpci_start()
139 outb(0, WDT_DC); /* Enable watchdog */ wdtpci_start()
141 inb(WDT_DC); /* Disable watchdog */ wdtpci_start()
162 outb(0, WDT_DC); /* Enable watchdog */ wdtpci_start()
172 * Stop the watchdog driver.
181 inb(WDT_DC); /* Disable watchdog */ wdtpci_stop()
191 * Reload counter one with the watchdog heartbeat. We don't bother
200 /* Write a watchdog value */ wdtpci_ping()
201 inb(WDT_DC); /* Disable watchdog */ wdtpci_ping()
206 outb(0, WDT_DC); /* Enable watchdog */ wdtpci_ping()
216 * Set a new heartbeat value for the watchdog device. If the heartbeat
235 * Extract the status information from a WDT watchdog device. There are
348 * @file: file handle to the watchdog
353 * A write to a watchdog device is defined as a keepalive signal. Any
383 * @cmd: watchdog command
386 * The watchdog API defines a common set of functions for all watchdogs
446 * The watchdog device has been opened. The watchdog device is single
472 * The watchdog has a configurable API. There is a religious dispute
473 * between people who want their watchdog to be able to shut down and
474 * those who want to be sure if the watchdog manager dies the machine
494 * @file: file handle to the watchdog board
579 .name = "watchdog",
744 MODULE_DESCRIPTION("Driver for the ICS PCI-WDT500/501 watchdog cards");
H A Dcpwd.c1 /* cpwd.c - driver implementation for hardware watchdog
4 * This device supports both the generic Linux watchdog
36 #include <asm/watchdog.h>
40 #define WD_OBPNAME "watchdog"
111 * When downcounter reaches '0' watchdog expires.
117 * NOTES: After watchdog reset, dcntr and limit contain '1'
136 * WD3 - 1 == Interrupt disabled for watchdog 3
137 * WD2 - 1 == Interrupt disabled for watchdog 2
138 * WD1 - 1 == Interrupt disabled for watchdog 1
171 MODULE_DESCRIPTION("Hardware watchdog driver for Sun Microsystems CP1400/1500");
173 MODULE_SUPPORTED_DEVICE("watchdog");
196 /* Enable or disable watchdog interrupts
267 /* Stop a running watchdog timer-- the timer actually keeps
283 /* Start a watchdog timer with the specified limit value
284 * If the watchdog is running, it will be restarted with
288 * watchdog.
566 prop_val = of_get_property(options, "watchdog-enable?", NULL); cpwd_probe()
569 prop_val = of_get_property(options, "watchdog-reboot?", NULL); cpwd_probe()
572 str_prop = of_get_property(options, "watchdog-timeout", NULL); cpwd_probe()
673 .name = "watchdog",
H A Dep93xx_wdt.c12 * Convert to a platform device and use the watchdog framework API
18 * This watchdog fires after 250msec, which is a too short interval
25 * - Test last reset from watchdog status
31 #include <linux/watchdog.h>
146 "EP93XX watchdog, driver version " WDT_VERSION "%s\n", ep93xx_wdt_probe()
H A Dpnx833x_wdt.c29 #include <linux/watchdog.h>
71 /* Enable watchdog causing reset. */ pnx833x_wdt_start()
76 /* Enable watchdog. */ pnx833x_wdt_start()
80 pr_info("Started watchdog timer\n"); pnx833x_wdt_start()
85 /* Disable watchdog causing reset. */ pnx833x_wdt_stop()
87 /* Disable watchdog.*/ pnx833x_wdt_stop()
91 pr_info("Stopped watchdog timer\n"); pnx833x_wdt_stop()
117 pr_info("Started watchdog timer\n"); pnx833x_wdt_open()
228 .name = "watchdog",
242 /*If bit 31 is set then watchdog was cause of reset.*/ watchdog_init()
244 pr_info("The system was previously reset due to the watchdog firing - please investigate...\n"); watchdog_init()
H A Dsbc8360.c44 #include <linux/watchdog.h>
64 * The function of the watchdog timer is to reset the system automatically
65 * and is defined at I/O port 0120H and 0121H. To enable the watchdog timer
68 * value to I/O port 0121H for the system to stop the watchdog function.
212 /* Activate and pre-configure watchdog */ sbc8360_activate()
215 /* Enable the watchdog */ sbc8360_activate()
226 /* Kernel pings watchdog */ sbc8360_ping()
233 /* stop watchdog */ sbc8360_stop()
236 /* De-activate the watchdog */ sbc8360_stop()
316 .name = "watchdog",
404 MODULE_DESCRIPTION("SBC8360 watchdog driver");
H A Dda9062_wdt.c18 #include <linux/watchdog.h>
131 dev_err(wdt->hw->dev, "Failed to ping the watchdog (err = %d)\n", da9062_wdt_stop()
154 dev_err(wdt->hw->dev, "Failed to ping the watchdog (err = %d)\n", da9062_wdt_ping()
170 dev_err(wdt->hw->dev, "Failed to set watchdog timeout (err = %d)\n", da9062_wdt_set_timeout()
221 "watchdog registration failed (%d)\n", ret); da9062_wdt_probe()
246 .name = "da9062-watchdog",
254 MODULE_ALIAS("platform:da9062-watchdog");
H A Diop_wdt.c2 * drivers/char/watchdog/iop_wdt.c
35 #include <linux/watchdog.h>
54 * wdt_supports_disable - determine if we are accessing a iop13xx watchdog
132 .identity = "iop watchdog",
223 .name = "watchdog",
231 /* check if the reset was caused by the watchdog timer */ iop_wdt_init()
260 MODULE_DESCRIPTION("iop watchdog timer driver");
H A Dlantiq_wdt.c15 #include <linux/watchdog.h>
34 #define LTQ_WDT_CR 0x0 /* watchdog control register */
35 #define LTQ_WDT_SR 0x8 /* watchdog status register */
76 * this turns the watchdog off ltq_wdt_disable()
167 pr_err("watchdog closed without warning\n"); ltq_wdt_release()
185 .name = "watchdog",
208 /* find out if the watchdog caused the last reboot */ ltq_wdt_probe()
H A Docteon-wdt-main.c29 * The OCTEON watchdog has a maximum timeout of 2^32 * io_clock.
31 * software to request longer watchdog heartbeats, we maintain software
34 * only result is a watchdog reset sooner than was requested. But
38 * The hardware watchdog interval we call the period. The OCTEON
39 * watchdog goes through several stages, after the first period an
42 * So for the software counters, we reset watchdog after each period
44 * let the watchdog progress to the NMI stage so we disable the irq
48 * A watchdog is maintained for each CPU in the system, that way if
50 * The userspace ping resets the watchdog on all CPUs.
52 * Before userspace opens the watchdog device, we still run the
61 #include <linux/watchdog.h>
174 * If bit one set handle the NMI as a watchdog event. octeon_wdt_build_stage1()
243 * Poke the watchdog when an interrupt is received
257 /* We're alive, poke the watchdog */ octeon_wdt_poke_irq()
387 /* Poke the watchdog to clear out its state */ octeon_wdt_disable_interrupt()
419 /* Poke the watchdog to clear out its state */ octeon_wdt_setup_interrupt()
422 /* Finally enable the watchdog now that all handlers are installed */ octeon_wdt_setup_interrupt()
637 /* Disable the watchdog */ for_each_online_cpu()
H A Dsp5100_tco.c31 #include <linux/watchdog.h>
57 /* the watchdog platform device */
119 /* Write new heartbeat to watchdog */ tco_timer_set_heartbeat()
140 /* Enable watchdog decode bit and watchdog timer */ tco_timer_enable()
148 /* Enable watchdog decode bit */ tco_timer_enable()
169 * /dev/watchdog handling
174 /* /dev/watchdog can only be opened once */ sp5100_tco_open()
190 pr_crit("Unexpected close, not stopping watchdog!\n"); sp5100_tco_release()
294 .name = "watchdog",
359 * First, Find the watchdog timer MMIO address from indirect I/O.
381 * Secondly, Find the watchdog timer MMIO address
430 pr_info("Using 0x%04x for watchdog MMIO address\n", val);
432 /* Setup the watchdog timer */
435 /* Check that the watchdog action is set to reset the system */
470 * Check whether or not the hardware watchdog is there. If found, then sp5100_tco_init()
476 /* Check to see if last reboot was due to watchdog timeout */ sp5100_tco_init()
477 pr_info("Last reboot was %striggered by watchdog.\n", sp5100_tco_init()
H A Drc32434_wdt.c2 * IDT Interprise 79RC32434 watchdog driver
29 #include <linux/watchdog.h> /* For the watchdog specific items */
50 * the watchdog timer ticks at. */
121 pr_info("Started watchdog timer\n"); rc32434_wdt_start()
132 pr_info("Stopped watchdog timer\n"); rc32434_wdt_stop()
259 .name = "watchdog",
282 /* Make sure the watchdog is not running */ rc32434_wdt_probe()
295 pr_err("failed to register watchdog device\n"); rc32434_wdt_probe()
329 MODULE_DESCRIPTION("Driver for the IDT RC32434 SoC watchdog");
H A Di6300esb.c38 #include <linux/watchdog.h>
82 static unsigned short triggered; /* The status of the watchdog upon boot */
85 /* We can only use 1 card due to the /dev/watchdog restriction */
195 * /dev/watchdog handling
200 /* /dev/watchdog can only be opened once */ esb_open()
216 pr_crit("Unexpected close, not stopping watchdog!\n"); esb_release()
329 .name = "watchdog",
388 * The watchdog has two timers, it can be setup so that the esb_initdevice()
401 /* Set the timer to watchdog mode and disable it for now */ esb_initdevice()
404 /* Check if the watchdog was previously triggered */ esb_initdevice()
433 /* Check whether or not the hardware watchdog is there */ esb_probe()
445 /* Initialize the watchdog and make sure it does not run */ esb_probe()
448 /* Register the watchdog so that userspace has access to it */ esb_probe()
H A DMakefile6 watchdog-objs += watchdog_core.o watchdog_dev.o
7 obj-$(CONFIG_WATCHDOG_CORE) += watchdog.o
9 # Only one watchdog can succeed. We probe the ISA/PCI/USB based
10 # watchdog-cards first, then the architecture specific watchdog
14 # that also fails then you can fall back to the software watchdog
H A Dmena21_wdt.c16 #include <linux/watchdog.h>
217 dev_err(&pdev->dev, "Cannot register watchdog device\n"); a21_wdt_probe()
221 dev_info(&pdev->dev, "MEN A21 watchdog timer driver enabled\n"); a21_wdt_probe()
236 "Unregistering A21 watchdog driver, board may reboot\n"); a21_wdt_remove()
263 .name = "a21-watchdog",
273 MODULE_ALIAS("platform:a21-watchdog");
H A Dpnx4008_wdt.c2 * drivers/char/watchdog/pnx4008_wdt.c
26 #include <linux/watchdog.h>
177 dev_err(&pdev->dev, "cannot register watchdog device\n"); pnx4008_wdt_probe()
210 .name = "pnx4008-watchdog",
231 "Set to 1 to keep watchdog running after device release");
234 MODULE_ALIAS("platform:pnx4008-watchdog");
H A Dretu_wdt.c2 * Retu watchdog driver
25 #include <linux/watchdog.h>
38 * Since Retu watchdog cannot be disabled in hardware, we must kick it
39 * with a timer until userspace watchdog software takes over. If
98 .identity = "Retu watchdog",
175 MODULE_DESCRIPTION("Retu watchdog");
H A Dsc520_wdt.c47 * drivers in that the driver will ping the watchdog by itself,
62 #include <linux/watchdog.h>
79 * We will program the SC520 watchdog for a timeout of 2.01s.
80 * If we reset the watchdog every ~250ms we should be safe.
88 * char to /dev/watchdog every 30 seconds.
152 pr_warn("Heartbeat lost! Will not ping the watchdog\n"); wdt_timer_ping()
183 /* Start the watchdog */ wdt_startup()
195 /* Stop the watchdog */ wdt_turnoff()
219 * /dev/watchdog handling
269 pr_crit("Unexpected close, not stopping watchdog!\n"); fop_close()
347 .name = "watchdog",
433 "Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");
H A Dcadence_wdt.c22 #include <linux/watchdog.h>
74 * @cdns_wdt_device: watchdog device structure
77 * Structure containing parameters specific to cadence watchdog.
121 * cdns_wdt_stop - Stop the watchdog.
123 * @wdd: watchdog device
143 * cdns_wdt_reload - Reload the watchdog timer (i.e. pat the watchdog).
145 * @wdd: watchdog device
164 * cdns_wdt_start - Enable and start the watchdog.
166 * @wdd: watchdog device
227 * cdns_wdt_settimeout - Set a new timeout value for the watchdog device.
229 * @wdd: watchdog device
245 * cdns_wdt_irq_handler - Notifies of watchdog timeout.
251 * The handler is invoked when the watchdog times out and a
266 * to the upper layers. This is defined in watchdog.h header file.
269 .identity = "cdns_wdt watchdog",
H A Dixp4xx_wdt.c2 * drivers/char/watchdog/ixp4xx_wdt.c
24 #include <linux/watchdog.h>
171 .name = "watchdog",
180 pr_err("Rev. A0 IXP42x CPU detected - watchdog disabled\n"); ixp4xx_wdt_init()
H A Domap_wdt.c4 * Watchdog driver for the TI OMAP 16xx & 24xx/34xx 32KHz (non-secure) watchdog
22 * 1. Modified to support OMAP1610 32-KHz watchdog timer
35 #include <linux/watchdog.h>
54 MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)");
93 /* Sequence to enable the watchdog */ omap_wdt_enable()
107 /* sequence required to disable watchdog */ omap_wdt_disable()
144 * Make sure the watchdog is disabled. This is unfortunately required omap_wdt_start()
145 * because writing to various registers with the watchdog running has no omap_wdt_start()
320 * through sysfs rather than by stopping the watchdog daemon). Also, this
H A Drt2880_wdt.c2 * Ralink RT288x/RT3xxx/MT76xx built-in hardware watchdog timer
7 * This driver was based on: drivers/watchdog/softdog.c
18 #include <linux/watchdog.h>
207 MODULE_DESCRIPTION("MediaTek/Ralink RT288x/RT3xxx hardware watchdog driver");
H A Dsbc7240_wdt.c31 #include <linux/watchdog.h>
51 MODULE_PARM_DESC(nowayout, "Disable watchdog when closing device file");
64 /* disable the watchdog */ wdt_disable()
73 /* enable the watchdog */ wdt_enable()
101 * /dev/watchdog handling
148 pr_crit("Unexpected close, not stopping watchdog!\n"); fop_close()
227 .name = "watchdog",
249 pr_info("Removing watchdog\n"); sbc7240_wdt_unload()
267 /* The IO port 0x043 used to disable the watchdog sbc7240_wdt_init()
H A Dshwdt.c2 * drivers/watchdog/shwdt.c
4 * Watchdog driver for integrated watchdog in the SuperH processors.
29 #include <linux/watchdog.h>
37 #include <asm/watchdog.h>
43 * values, consult the asm-sh/watchdog.h. Overload this at module load
196 "the watchdog\n"); sh_wdt_ping()
227 * As this driver only covers the global watchdog case, reject sh_wdt_probe()
274 dev_err(&pdev->dev, "Can't register watchdog (err=%d)\n", rc); sh_wdt_probe()
335 MODULE_DESCRIPTION("SuperH watchdog driver");
H A Dwm831x_wdt.c17 #include <linux/watchdog.h>
23 #include <linux/mfd/wm831x/watchdog.h>
120 dev_err(wm831x->dev, "Hardware watchdog update unsupported\n"); wm831x_wdt_ping()
195 dev_err(wm831x->dev, "Failed to read watchdog status: %d\n", wm831x_wdt_probe()
229 "Unknown watchdog timeout: %x\n", reg); wm831x_wdt_probe()
235 pdata = chip_pdata->watchdog; wm831x_wdt_probe()
261 /* Make sure the watchdog takes hardware updates */ wm831x_wdt_probe()
304 .name = "wm831x-watchdog",
313 MODULE_ALIAS("platform:wm831x-watchdog");
H A Ds3c2410_wdt.c1 /* linux/drivers/char/watchdog/s3c2410_wdt.c
32 #include <linux/watchdog.h>
102 * @disable_reg: Offset in pmureg for the register that disables the watchdog
104 * @mask_reset_reg: Offset in pmureg for the register that masks the watchdog
106 * @mask_bit: Bit number for the watchdog timer in the disable register and the
109 * @rst_stat_bit: Bit number in the rst_stat register indicating a watchdog
193 /* watchdog control routines */
321 /* if the count is bigger than the watchdog register, s3c2410wdt_set_heartbeat()
382 dev_info(wdt->dev, "watchdog timer expired (irq)\n"); s3c2410wdt_irq()
401 * watchdog to trigger, we perform an keep-alive if s3c2410wdt_cpufreq_transition()
402 * the watchdog is running. s3c2410wdt_cpufreq_transition()
462 /* disable watchdog, to be safe */ s3c2410wdt_restart()
469 /* set the watchdog to go and reset... */ s3c2410wdt_restart()
550 /* get the memory region for the watchdog timer */ s3c2410wdt_probe()
560 wdt->clock = devm_clk_get(dev, "watchdog"); s3c2410wdt_probe()
562 dev_err(dev, "failed to find watchdog clock source\n"); s3c2410wdt_probe()
614 dev_err(dev, "cannot register watchdog (%d)\n", ret); s3c2410wdt_probe()
623 dev_info(dev, "starting watchdog timer\n"); s3c2410wdt_probe()
626 /* if we're not enabling the watchdog, then ensure it is s3c2410wdt_probe()
645 dev_info(dev, "watchdog %sactive, reset %sabled, irq %sabled\n", s3c2410wdt_probe()
701 /* Save watchdog state, and turn it off. */ s3c2410wdt_suspend()
720 /* Restore watchdog state. */ s3c2410wdt_resume()
729 dev_info(dev, "watchdog %sabled\n", s3c2410wdt_resume()
H A Dalim7101_wdt.c11 * drivers in that the driver will ping the watchdog by itself,
29 #include <linux/watchdog.h>
50 * If we reset the watchdog every ~250ms we should be safe. */
57 * char to /dev/watchdog every 30 seconds.
71 "Use the gpio watchdog (required by old cobalt boards).");
113 pr_warn("Heartbeat lost! Will not ping the watchdog\n"); wdt_timer_ping()
180 * /dev/watchdog handling
300 .name = "watchdog",
309 * than getting the watchdog to pull reset, so we restart the wdt_restart_handle()
310 * watchdog on reboot with no heartbeat. wdt_restart_handle()
314 /* loop until the watchdog fires */ wdt_restart_handle()
H A Dit8712f_wdt.c8 * drivers/char/watchdog/scx200_wdt.c
29 #include <linux/watchdog.h>
52 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
91 MODULE_PARM_DESC(wdt_control_reg, "Value to write to watchdog control "
189 pr_debug("enabling watchdog timer\n"); it8712f_wdt_enable()
209 pr_debug("disabling watchdog timer\n"); it8712f_wdt_disable()
336 pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); it8712f_wdt_release()
358 .name = "watchdog",
413 pr_warn("watchdog I/O region busy\n"); it8712f_wdt_init()
419 pr_err("unable to disable watchdog timer\n"); it8712f_wdt_init()
H A Dar7_wdt.c2 * drivers/watchdog/ar7_wdt.c
33 #include <linux/watchdog.h>
55 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
159 pr_debug("enabling watchdog timer\n"); ar7_wdt_enable_wdt()
166 pr_debug("disabling watchdog timer\n"); ar7_wdt_disable_wdt()
184 pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); ar7_wdt_release()
271 .name = "watchdog",
H A Dath79_wdt.c2 * Atheros AR71XX/AR724X/AR913X built-in hardware watchdog timer.
7 * This driver was based on: drivers/watchdog/ixp4xx_wdt.c
33 #include <linux/watchdog.h>
99 * before enabling the watchdog. ath79_wdt_enable()
142 pr_crit("device closed unexpectedly, watchdog timer will not stop!\n"); ath79_wdt_release()
183 .identity = "ATH79 watchdog",
246 .name = "watchdog",
335 MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X hardware watchdog driver");
H A Dbcm2835_wdt.c6 * as a hardware reference for the Broadcom BCM2835 watchdog timer.
21 #include <linux/watchdog.h>
156 * We set the watchdog hard reset bit here to distinguish this reset bcm2835_power_off()
184 dev_err(dev, "Failed to remap watchdog regs"); bcm2835_wdt_probe()
194 dev_err(dev, "Failed to register watchdog device"); bcm2835_wdt_probe()
205 dev_info(dev, "Broadcom BCM2835 watchdog timer"); bcm2835_wdt_probe()
245 MODULE_PARM_DESC(heartbeat, "Initial watchdog heartbeat in seconds");
252 MODULE_DESCRIPTION("Driver for Broadcom BCM2835 watchdog timer");
H A Dcpu5wdt.c2 * sma cpu5 watchdog driver
36 #include <linux/watchdog.h>
81 /* keep watchdog alive */ cpu5wdt_trigger()
211 .name = "watchdog",
236 /* watchdog reboot? */ cpu5wdt_init()
288 MODULE_DESCRIPTION("sma cpu5 watchdog driver");
289 MODULE_SUPPORTED_DEVICE("sma cpu5 watchdog");
293 MODULE_PARM_DESC(port, "base address of watchdog card, default is 0x91");
H A Dib700wdt.c39 #include <linux/watchdog.h>
62 * The function of the watchdog timer is to reset the system
64 * watchdog timer and allow the system to reset, write I/O port 0443H.
66 * watchdog function. The timer has a tolerance of 20% for its
122 /* Write a watchdog value */ ibwdt_ping()
145 * /dev/watchdog handling
272 .name = "watchdog",
379 MODULE_DESCRIPTION("IB700 SBC watchdog driver");
H A Dmixcomwd.c18 * - added kernel timer watchdog ping after close
19 * since the hardware does not support watchdog shutdown
52 #include <linux/watchdog.h>
206 .identity = "MixCOM watchdog", mixcomwd_ioctl()
241 .name = "watchdog",
249 if (!request_region(port, 1, "MixCOM watchdog")) checkcard()
287 pr_info("MixCOM watchdog driver v%s, watchdog port at 0x%3x\n", mixcomwd_init()
H A Dmpc8xxx_wdt.c2 * mpc8xxx_wdt.c - MPC8xx/MPC83xx/MPC86xx watchdog userspace interface
30 #include <linux/watchdog.h>
37 __be32 swcrr; /* System watchdog control register */
42 __be32 swcnr; /* System watchdog count register */
44 __be16 swsrr; /* System watchdog service register */
192 pr_err("cannot register watchdog device (err=%d)\n", ret); mpc8xxx_wdt_probe()
200 * If the watchdog was previously enabled or we're running on mpc8xxx_wdt_probe()
270 MODULE_DESCRIPTION("Driver for watchdog timer in MPC8xx/MPC83xx/MPC86xx "
H A Drdc321x_wdt.c2 * RDC321x watchdog driver
35 #include <linux/watchdog.h>
78 /* keep watchdog alive */ rdc321x_wdt_trigger()
115 /* Enable watchdog and set the timeout to 81.92 us */ rdc321x_wdt_start()
223 .name = "watchdog",
256 /* Reset the watchdog */ rdc321x_wdt_probe()
269 dev_info(&pdev->dev, "watchdog init success\n"); rdc321x_wdt_probe()
297 MODULE_DESCRIPTION("RDC321x watchdog driver");
H A Dwatchdog_core.h10 * by all the watchdog timer drivers.
29 #define MAX_DOGS 32 /* Maximum number of watchdog devices */
H A Dm54xx_wdt.c2 * drivers/watchdog/m54xx_wdt.c
7 * Adapted from the IXP4xx watchdog driver, which carries these notices:
27 #include <linux/watchdog.h>
66 /* disable watchdog */ wdt_disable()
192 .name = "watchdog",
H A Dmoxart_wdt.c2 * MOXA ART SoCs watchdog driver.
21 #include <linux/watchdog.h>
168 { .compatible = "moxa,moxart-watchdog" },
177 .name = "moxart-watchdog",
186 MODULE_DESCRIPTION("MOXART watchdog driver");
H A Dmtx-1_wdt.c26 * use the Linux watchdog/timer APIs
32 * A timer triggers the watchdog every 5 seconds, until
47 #include <linux/watchdog.h>
201 .name = "watchdog",
257 MODULE_DESCRIPTION("Driver for the MTX-1 watchdog");
H A Dsa1100_wdt.c29 #include <linux/watchdog.h>
65 * The watchdog cannot be disabled.
68 * clearing OIER[E3] would prevent the watchdog timing out but this
153 .name = "watchdog",
167 * we suspend, RCSR will be cleared, and the watchdog sa1100dog_init()
H A Dsb_wdog.c30 * This watchdog borrows some user semantics from the softdog driver,
31 * in that if you close the fd, it leaves the watchdog running, unless
33 * the watchdog when you close the fd like some other drivers.
35 * Based on various other watchdog drivers, which are probably all
55 #include <linux/watchdog.h>
131 pr_crit("%s: Unexpected close, not stopping watchdog!\n", sbwdog_release()
245 .name = "watchdog",
257 * code can use it to re-up the watchdog, thereby saving the kernel from
271 * if it's the second watchdog timer, it's for those users sbwdog_interrupt()
347 * first watchdog timer for the kernels own purpose.
H A Dsch311x_wdt.c3 * integrated watchdog.
30 #include <linux/watchdog.h> /* For the watchdog specific items */
142 /* set watchdog's timeout */ sch311x_wdt_start()
144 /* enable the watchdog */ sch311x_wdt_start()
166 /* stop the watchdog */ sch311x_wdt_stop()
222 * /dev/watchdog handling
327 pr_crit("Unexpected close, not stopping watchdog!\n"); sch311x_wdt_close()
350 .name = "watchdog",
382 /* Make sure that the watchdog is not running */ sch311x_wdt_probe()
H A Dacquirewdt.c64 #include <linux/watchdog.h> /* For the watchdog specific items */
79 /* the watchdog platform device */
107 /* Write a watchdog value */ acq_keepalive()
118 * /dev/watchdog handling
211 pr_crit("Unexpected close, not stopping watchdog!\n"); acq_close()
234 .name = "watchdog",
H A Dbcm63xx_wdt.c2 * Broadcom BCM63xx SoC watchdog driver
25 #include <linux/watchdog.h>
86 pr_crit("watchdog will restart system\n"); bcm63xx_timer_tick()
130 pr_crit("Unexpected close, not stopping watchdog!\n"); bcm63xx_wdt_release()
233 .name = "watchdog",
273 dev_err(&pdev->dev, "failed to register watchdog device\n"); bcm63xx_wdt_probe()
315 MODULE_DESCRIPTION("Driver for the Broadcom BCM63xx SoC watchdog");
H A Dbcm_kona_wdt.c21 #include <linux/watchdog.h>
47 * One watchdog tick is 1/(2^resolution) seconds. Resolution can take
51 * The watchdog counter is 20 bits. Depending on resolution, the maximum
54 * us a maximum of about 18 hours and 12 minutes before the watchdog
71 * If the WD_LOAD_FLAG is set, the watchdog counter field is being secure_register_read()
326 dev_err(dev, "Failed set watchdog timeout"); bcm_kona_wdt_probe()
332 dev_err(dev, "Failed to register watchdog device"); bcm_kona_wdt_probe()
H A Dsp805_wdt.c2 * drivers/char/watchdog/sp805-wdt.c
4 * Watchdog driver for ARM SP805 watchdog module
29 #include <linux/watchdog.h>
36 /* watchdog register offsets and masks */
75 "Set to 1 to keep watchdog running after device release");
163 /* enables watchdog timers reset */ wdt_enable()
169 /* disables watchdog timers reset */ wdt_disable()
H A Dsunxi_wdt.c30 #include <linux/watchdog.h>
48 * of Allwinner's watchdog hardware.
67 * wdt_timeout_map maps the watchdog timer interval value in seconds to
105 /* Set lowest timeout and enable watchdog */ sunxi_restart_handle()
112 * Restart the watchdog. The default (and lowest) interval sunxi_restart_handle()
113 * value for the watchdog is 0.5s. sunxi_restart_handle()
190 /* Enable watchdog */ sunxi_wdt_start()
H A Dtegra_wdt.c20 #include <linux/watchdog.h>
22 /* minimum and maximum watchdog trigger timeout, in seconds */
30 * This driver only configures the first watchdog (WDT ID 0).
36 * Register base of the timer that's selected for pairing with the watchdog.
93 * period to 1 second by writing 1000000ul, but the watchdog system tegra_wdt_start()
205 * Allocate our watchdog driver data, which has the tegra_wdt_probe()
232 "failed to register watchdog device\n"); tegra_wdt_probe()
H A Dmachzwd.c39 #include <linux/watchdog.h>
107 .identity = "ZF-Logic watchdog",
112 * action refers to action taken when watchdog resets
121 MODULE_PARM_DESC(action, "after watchdog resets, generate: "
137 /* timeout for hardware watchdog (~500ms) */
199 /* stop watchdog timer */ zf_timer_off()
230 /* start watchdog timer */ zf_timer_on()
276 * no way to disable watchdog ;) zf_write()
375 .name = "watchdog",
H A Dnv_tco.c30 #include <linux/watchdog.h>
54 /* the watchdog platform device */
132 /* Write new heartbeat to watchdog */ tco_timer_set_heartbeat()
152 * /dev/watchdog handling
157 /* /dev/watchdog can only be opened once */ nv_tco_open()
173 pr_crit("Unexpected close, not stopping watchdog!\n"); nv_tco_release()
280 .name = "watchdog",
385 /* Check whether or not the hardware watchdog is there */ nv_tco_init()
389 /* Check to see if last reboot was due to watchdog timeout */ nv_tco_init()
H A Dsbc60xxwdt.c18 * 25/4 - 2000 Added /dev/watchdog support
44 * *) The driver will ping the watchdog by itself, because this
59 #include <linux/watchdog.h>
85 * The 60xx board can use watchdog timeout values from one second
87 * the watchdog every ~250ms we should be safe.
95 * char to /dev/watchdog every 30 seconds.
136 pr_warn("Heartbeat lost! Will not ping the watchdog\n"); wdt_timer_ping()
167 * /dev/watchdog handling
293 .name = "watchdog",
H A Dw83877f_wdt.c39 * drivers in that the driver will ping the watchdog by itself,
53 #include <linux/watchdog.h>
74 * EMACS PC-104 board I'm using). If we reset the watchdog every
82 * char to /dev/watchdog every 30 seconds.
129 pr_warn("Heartbeat lost! Will not ping the watchdog\n"); wdt_timer_ping()
148 /* enable watchdog */ wdt_change()
187 * /dev/watchdog handling
315 .name = "watchdog",
407 MODULE_DESCRIPTION("Driver for watchdog timer in w83877f chip");
H A Dkempld_wdt.c2 * Kontron PLD watchdog driver
16 * Note: From the PLD watchdog point of view timeout and pretimeout are
30 #include <linux/watchdog.h>
305 /* Check if the watchdog was enabled */ kempld_wdt_start()
325 /* Check if the watchdog was disabled */ kempld_wdt_stop()
463 /* Enable nowayout if watchdog is already locked */ kempld_wdt_probe()
468 "Forcing nowayout - watchdog lock enabled!\n"); kempld_wdt_probe()
485 /* Check if watchdog is already enabled */ kempld_wdt_probe()
487 /* Get current watchdog settings */ kempld_wdt_probe()
523 /* Disable watchdog if it is active during suspend */ kempld_wdt_suspend()
543 /* Enable watchdog and configure it if necessary */ kempld_wdt_resume()
550 * If watchdog was stopped before suspend be sure it gets disabled kempld_wdt_resume()
H A Dat91sam9_wdt.h2 * drivers/watchdog/at91sam9_wdt.h
H A Ddigicolor_wdt.c17 #include <linux/watchdog.h>
135 dev_err(dev, "Failed to remap watchdog regs"); dc_wdt_probe()
154 dev_err(dev, "Failed to register watchdog device"); dc_wdt_probe()
205 MODULE_DESCRIPTION("Driver for Conexant Digicolor watchdog timer");
H A Dindydog.c24 #include <linux/watchdog.h>
55 pr_info("Stopped watchdog timer\n"); indydog_stop()
78 pr_info("Started watchdog timer\n"); indydog_open()
165 .name = "watchdog",
H A Dof_xilinx_wdt.c18 #include <linux/watchdog.h>
57 /* Clean previous status and enable the watchdog timer */ xilinx_wdt_start()
171 "The watchdog clock frequency cannot be obtained\n"); xwdt_probe()
206 dev_err(&pdev->dev, "Cannot register watchdog (err=%d)\n", rc); xwdt_probe()
H A Dsama5d4_wdt.c17 #include <linux/watchdog.h>
21 /* minimum and maximum watchdog timeout, in seconds */
137 if (!of_property_read_string(np, "atmel,watchdog-type", &tmp) && of_sama5d4_wdt_init()
239 dev_err(&pdev->dev, "failed to register watchdog device\n"); sama5d4_wdt_probe()
H A Dsbc_epx_c3.c25 #include <linux/watchdog.h>
55 pr_info("Stopped watchdog timer\n"); epx_c3_stop()
79 pr_info("Started watchdog timer\n"); epx_c3_open()
169 .name = "watchdog",
H A Domap_wdt.h2 * linux/drivers/char/watchdog/omap_wdt.h
43 /* Using the prescaler, the OMAP watchdog could go for many
H A Dadvantechwdt.c37 #include <linux/watchdog.h>
50 /* the watchdog platform device */
92 /* Write a watchdog value */ advwdt_ping()
110 * /dev/watchdog handling
210 pr_crit("Unexpected close, not stopping watchdog!\n"); advwdt_close()
233 .name = "watchdog",
H A Dnuc900_wdt.c25 #include <linux/watchdog.h>
37 * The watchdog time interval can be calculated via following formula:
143 "Unexpected close, not stopping watchdog!\n"); nuc900_wdt_close()
153 .identity = "nuc900 watchdog",
239 .name = "watchdog",
264 dev_err(&pdev->dev, "failed to find watchdog clock source\n"); nuc900wdt_probe()
H A Dwafer5823wdt.c34 #include <linux/watchdog.h>
56 * port WDT_START, then read the port to start the watchdog. To pat
78 /* pat watchdog */ wafwdt_ping()
87 /* start up watchdog */ wafwdt_start()
94 /* stop watchdog */ wafwdt_stop()
243 .name = "watchdog",
H A Dw83627hf_wdt.c5 * converted to watchdog infrastructure
37 #include <linux/watchdog.h>
69 MODULE_PARM_DESC(early_disable, "Disable watchdog at boot time (default=0)");
220 pr_warn("Stopping previously enabled watchdog until userland kicks in\n"); w83627hf_init()
229 /* set second mode & disable keyboard turning off watchdog */ w83627hf_init()
233 /* reset trigger, disable keyboard & mouse turning off watchdog */ w83627hf_init()
462 pr_err("failed to initialize watchdog (err=%d)\n", ret); wdt_init()
H A Dmax63xx_wdt.c2 * drivers/char/watchdog/max63xx_wdt.c
4 * Driver for max63{69,70,71,72,73,74} watchdog timers
12 * This driver assumes the watchdog pins are memory mapped (as it is
22 #include <linux/watchdog.h>
37 * to ping the watchdog.
H A Dst_lpc_wdt.c25 #include <linux/watchdog.h>
104 /* Type of watchdog reset - 0: Cold 1: Warm */ st_wdog_setup()
111 /* Mask/unmask watchdog reset */ st_wdog_setup()
258 dev_err(&pdev->dev, "Unable to initialise watchdog timeout\n"); st_wdog_probe()
265 dev_err(&pdev->dev, "Unable to register watchdog\n"); st_wdog_probe()
H A Dbcm7038_wdt.c22 #include <linux/watchdog.h>
86 /* Can't modify timeout value if watchdog timer is running */ bcm7038_wdt_set_timeout()
159 dev_err(dev, "Failed to register watchdog device\n"); bcm7038_wdt_probe()
H A Dda9063_wdt.c16 #include <linux/watchdog.h>
100 dev_alert(wdt->da9063->dev, "Failed to ping the watchdog (err = %d)\n", da9063_wdt_ping()
116 dev_err(wdt->da9063->dev, "Failed to set watchdog timeout (err = %d)\n", da9063_wdt_set_timeout()
H A Dgeodewdt.c18 #include <linux/watchdog.h>
104 pr_crit("Unexpected close - watchdog is not stopping\n"); geodewdt_release()
214 .name = "watchdog",
H A Djz4740_wdt.c20 #include <linux/watchdog.h>
148 { .compatible = "ingenic,jz4740-watchdog", },
164 dev_err(&pdev->dev, "Unable to alloacate watchdog device\n"); jz4740_wdt_probe()
H A Dpcwd_pci.c44 #include <linux/watchdog.h> /* For the watchdog specific items */
90 * watchdog card is 100 ms, so we give it 150 ms to do it's job */
112 /* We can only use 1 card due to the /dev/watchdog restriction */
119 /* this is private data for each PCI-PC watchdog card */
312 /* Re-trigger watchdog by writing to port 0 */ pcipcwd_keepalive()
331 /* Write new heartbeat to watchdog */ pcipcwd_set_heartbeat()
368 pr_info("clearing watchdog trip status & LED\n"); pcipcwd_clear_status()
435 * /dev/watchdog handling
571 /* /dev/watchdog can only be opened once */ pcipcwd_open()
592 pr_crit("Unexpected close, not stopping watchdog!\n"); pcipcwd_release()
659 .name = "watchdog",
H A Dsbc_fitpc2_wdt.c6 * Adapted from the IXP2000 watchdog driver by Deepak Saxena.
18 #include <linux/watchdog.h>
195 .name = "watchdog",
H A Dsirfsoc_wdt.c10 #include <linux/watchdog.h>
38 MODULE_PARM_DESC(timeout, "Default watchdog timeout (in seconds)");
223 MODULE_DESCRIPTION("SiRF SoC watchdog driver");
H A Dpcwd.c23 * added watchdog disable/re-enable routines. Added firmware
65 #include <linux/watchdog.h> /* For the watchdog specific items */
127 /* max. time we give an ISA watchdog card to process a command */
160 * We are using an kernel timer to do the pinging of the watchdog
162 * watchdog to 2 ms.
167 /* We can only use 1 card due to the /dev/watchdog restriction */
175 /* this is private data for each ISA-PC watchdog card */
186 struct timer_list timer; /* The timer that pings the watchdog */
377 /* Ping the watchdog */ pcwd_timer_ping()
388 /* Re-trigger watchdog by writing to port 0 */ pcwd_timer_ping()
397 pr_warn("Heartbeat lost! Will not ping the watchdog\n"); pcwd_timer_ping()
418 pr_info("Could not start watchdog\n"); pcwd_start()
446 pr_info("Could not stop watchdog\n"); pcwd_stop()
537 pr_info("clearing watchdog trip status\n"); pcwd_clear_status()
582 * /dev/watchdog handling
706 pr_crit("Unexpected close, not stopping watchdog!\n"); pcwd_close()
760 .name = "watchdog",
H A DiTCO_wdt.c15 * The TCO watchdog is implemented in the following I/O controller hubs:
60 #include <linux/watchdog.h> /* For the watchdog specific items */
106 /* whether or not the watchdog has been suspended */
127 "Turn off SMI clearing watchdog (depends on TCO-version)(default=1)");
312 /* Write new heartbeat to watchdog */ iTCO_wdt_set_timeout()
498 val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ iTCO_wdt_probe()
536 /* Make sure the watchdog is not running */ iTCO_wdt_probe()
549 pr_err("cannot register watchdog device (err=%d)\n", ret); iTCO_wdt_probe()
596 * the watchdog cannot be pinged while in that state. In ACPI sleep states the
597 * watchdog is stopped by the platform firmware.
H A Dqcom-wdt.c21 #include <linux/watchdog.h>
97 * Trigger watchdog bite: qcom_wdt_restart()
130 /* We use CPU0's DGT for the watchdog */ qcom_wdt_probe()
186 dev_err(&pdev->dev, "failed to register watchdog\n"); qcom_wdt_probe()
H A Dxen_wdt.c30 #include <linux/watchdog.h>
123 /* /dev/watchdog can only be opened once */ xen_wdt_open()
140 pr_crit("unexpected close, not stopping watchdog!\n"); xen_wdt_release()
243 .name = "watchdog",
H A Dhpwdt.c30 #include <linux/watchdog.h>
517 * /dev/watchdog handling
521 /* /dev/watchdog can only be opened once */ hpwdt_open()
525 /* Start the watchdog */ hpwdt_open()
534 /* Stop the watchdog */ hpwdt_release()
538 pr_crit("Unexpected close, not stopping watchdog!\n"); hpwdt_release()
544 /* /dev/watchdog is being closed, make sure it can be re-opened */ hpwdt_release()
661 .name = "watchdog",
846 /* Make sure that timer is disabled until /dev/watchdog is opened */ hpwdt_init_one()
899 MODULE_DESCRIPTION("hp watchdog driver");
H A Dsc1200wdt.c39 #include <linux/watchdog.h>
162 /* If the bit is inactive, the watchdog is enabled, so return sc1200wdt_status()
321 .name = "watchdog",
346 /* National Semiconductor PC87307/PC97307 watchdog component */
478 "Driver for National Semiconductor PC87307/PC97307 watchdog component");
H A Dpcwd_usb.c36 #include <linux/watchdog.h> /* For the watchdog specific items */
84 * watchdog card is 100 or 200 ms, so we give it 250 ms to do it's job */
111 /* We can only use 1 card due to the /dev/watchdog restriction */
323 /* Write new heartbeat to watchdog */ usb_pcwd_set_heartbeat()
361 * /dev/watchdog handling
482 /* /dev/watchdog can only be opened once */ usb_pcwd_open()
500 pr_crit("Unexpected close, not stopping watchdog!\n"); usb_pcwd_release()
564 .name = "watchdog",
/linux-4.4.14/include/linux/
H A Dwatchdog.h2 * Generic watchdog defines. Derived from..
15 #include <uapi/linux/watchdog.h>
20 /** struct watchdog_ops - The watchdog-devices operations
23 * @start: The routine for starting the watchdog device.
24 * @stop: The routine for stopping the watchdog device.
25 * @ping: The routine that sends a keepalive ping to the watchdog device.
26 * @status: The routine that shows the status of the watchdog device.
27 * @set_timeout:The routine for setting the watchdog devices timeout value (in seconds).
34 * that control a watchdog device. It also contains the module that owns
53 /** struct watchdog_device - The structure that defines a watchdog device
55 * @id: The watchdog's ID. (Allocated by watchdog_register_device)
56 * @cdev: The watchdog's Character device.
57 * @dev: The device for our watchdog
60 * @ops: Pointer to the list of watchdog operations.
61 * @bootstatus: Status of the watchdog device at boot.
62 * @timeout: The watchdog devices timeout value (in seconds).
63 * @min_timeout:The watchdog devices minimum timeout value (in seconds).
64 * @max_timeout:The watchdog devices maximum timeout value (in seconds).
66 * @lock: Lock for watchdog core internal use only.
72 * watchdog timer device.
77 * The lock field is for watchdog core internal use only and should not be
95 #define WDOG_ACTIVE 0 /* Is the watchdog running/active */
96 #define WDOG_DEV_OPEN 1 /* Opened via /dev/watchdog ? */
106 /* Use the following function to check whether or not the watchdog is active */ watchdog_active()
133 /* Use the following functions to manipulate watchdog driver specific data */ watchdog_set_drvdata()
144 /* drivers/watchdog/watchdog_core.c */
H A Dbcm47xx_wdt.h7 #include <linux/watchdog.h>
H A Dnmi.h11 * touch_nmi_watchdog - restart NMI watchdog timeout.
13 * If the architecture supports the NMI watchdog, touch_nmi_watchdog()
/linux-4.4.14/arch/blackfin/include/asm/
H A Dbfin_watchdog.h2 * bfin_watchdog.h - Blackfin watchdog definitions
12 /* Bit in SWRST that indicates boot caused by watchdog */
15 /* Bit in WDOG_CTL that indicates watchdog has expired (WDR0) */
/linux-4.4.14/Documentation/
H A DMakefile4 watchdog
/linux-4.4.14/arch/mn10300/include/asm/
H A Dreset-regs.h1 /* MN10300 Reset controller and watchdog timer definitions
21 * watchdog timer registers
23 #define WDBC __SYSREGC(0xc0001000, u8) /* watchdog binary counter reg */
25 #define WDCTR __SYSREG(0xc0001002, u8) /* watchdog timer control reg */
33 #define WDCTR_WDCNE 0x80 /* watchdog timer enable */
38 #define RSTCTR_WDTRST 0x04 /* watchdog timer reset flag */
39 #define RSTCTR_WDREN 0x08 /* watchdog timer reset enable */
H A Dintctl-regs.h41 #define NMICR_WDIF 0x0002 /* watchdog timer overflow flag */
/linux-4.4.14/arch/arm/plat-samsung/
H A Dwatchdog-reset.c1 /* arch/arm/plat-samsung/watchdog-reset.c
46 /* disable watchdog, to be safe */ samsung_wdt_reset()
53 /* set the watchdog to go and reset... */ samsung_wdt_reset()
79 pr_err("%s: failed to find watchdog node\n", __func__); samsung_wdt_reset_of_init()
85 pr_err("%s: failed to map watchdog registers\n", __func__); samsung_wdt_reset_of_init()
96 wdt_clock = clk_get(NULL, "watchdog"); samsung_wdt_reset_init()
/linux-4.4.14/arch/mn10300/kernel/
H A DMakefile16 obj-$(CONFIG_MN10300_WD_TIMER) += mn10300-watchdog.o mn10300-watchdog-low.o
H A Dmn10300-watchdog.c30 static unsigned int watchdog; variable
86 watchdog = opt; setup_watchdog()
87 if (watchdog) { setup_watchdog()
102 __setup("watchdog=", setup_watchdog);
108 if (watchdog) { watchdog_go()
/linux-4.4.14/arch/cris/arch-v10/kernel/
H A Dtime.c71 /* Excerpt from the Etrax100 HSDD about the built-in watchdog:
75 * When the watchdog timer is started, it generates an NMI if the watchdog
77 * stopped after an additional 3.3 ms, the watchdog resets the chip.
78 * The watchdog timer is stopped after reset. The watchdog timer is controlled
87 * stopped 1 key_val Start watchdog with key = key_val.
88 * started 0 ~key Stop watchdog
89 * started 1 ~key Restart watchdog with key = ~key.
96 /* right now, starting the watchdog is the same as resetting it */
112 /* only keep watchdog happy as long as we have memory left! */ reset_watchdog()
114 /* reset the watchdog with the inverse of the old key */ reset_watchdog()
122 /* stop the watchdog - we still need the correct key */
159 /* reset watchdog otherwise it resets us! */ timer_interrupt()
250 /* enable watchdog if we should use one */ time_init()
252 printk("Enabling watchdog...\n"); time_init()
255 /* If we use the hardware watchdog, we want to trap it as an NMI time_init()
H A Dprocess.c47 /* if the watchdog is enabled, we can simply disable interrupts and go
48 * into an eternal loop, and the watchdog will reset the CPU after 0.1s
49 * if on the other hand the watchdog wasn't enabled, we just enable it and wait
56 * code to know about it than the watchdog handler in entry.S and hard_reset_now()
57 * this code, implementing hard reset through the watchdog. hard_reset_now()
69 /* Since we dont plan to keep on resetting the watchdog, hard_reset_now()
/linux-4.4.14/arch/cris/arch-v32/kernel/
H A Dtime.c37 #define ETRAX_WD_HZ 763 /* watchdog counts at 763 Hz */
38 /* Number of 763 counts before watchdog bites */
69 /* From timer MDS describing the hardware watchdog:
71 * The watchdog timer is an 8-bit timer with a configurable start value.
72 * Once started the watchdog counts downwards with a frequency of 763 Hz
73 * (100/131072 MHz). When the watchdog counts down to 1, it generates an
79 /* Right now, starting the watchdog is the same as resetting it */
104 /* Only keep watchdog happy as long as we have memory left! */ reset_watchdog()
106 /* Reset the watchdog with the inverse of the old key */ reset_watchdog()
117 /* stop the watchdog - we still need the correct key */
145 /* Check if forced restart or unexpected watchdog */ handle_watchdog_bite()
159 /* Unexpected watchdog, stop the watchdog and dump registers. */ handle_watchdog_bite()
161 printk(KERN_WARNING "Oops: bitten by watchdog\n"); handle_watchdog_bite()
304 /* Enable watchdog if we should use one. */ time_init()
307 printk(KERN_INFO "Enabling watchdog...\n"); time_init()
310 /* If we use the hardware watchdog, we want to trap it as an NMI time_init()
H A Dprocess.c42 * If the watchdog is enabled, disable interrupts and enter an infinite loop.
43 * The watchdog will reset the CPU after 0.1s. If the watchdog isn't enabled
53 * code to know about it than the watchdog handler in entry.S and hard_reset_now()
54 * this code, implementing hard reset through the watchdog. hard_reset_now()
/linux-4.4.14/drivers/staging/comedi/drivers/
H A Daddi_watchdog.c2 * COMEDI driver for the watchdog subdevice found on some addi-data boards
32 * The watchdog subdevice is configured with two INSN_CONFIG instructions:
34 * Enable the watchdog and set the reload timeout:
38 * Disable the watchdog:
56 dev_info(dev->class_dev, "watchdog enabled, timeout:%dms\n", addi_watchdog_insn_config()
94 dev_warn(dev->class_dev, "watchdog is disabled\n"); addi_watchdog_insn_write()
98 /* "ping" the watchdog */ addi_watchdog_insn_write()
H A Daddi_tcw.h6 * watchdog (TCW) registers and bits. Some of the registers are not used
/linux-4.4.14/include/xen/interface/
H A Dsched.h87 * Setup, poke and destroy a domain watchdog timer.
89 * With id == 0, setup a domain watchdog timer to cause domain shutdown
90 * after timeout, returns watchdog id.
91 * With id != 0 and timeout == 0, destroy domain watchdog timer.
92 * With id != 0 and timeout != 0, poke watchdog timer and set new timeout.
96 uint32_t id; /* watchdog ID */
109 #define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */
/linux-4.4.14/arch/arm/mach-omap2/
H A Dwd_timer.c27 * settings, WDT module is reset during init. This enables the watchdog
28 * timer. Hence it is required to disable the watchdog after the WDT reset
30 * watchdog timer registers settings.
51 /* sequence required to disable watchdog */ omap2_wd_timer_disable()
68 * care to execute the special watchdog disable sequence. This is
69 * because the watchdog is re-armed upon OCP softreset. (On OMAP4,
70 * this behavior was apparently changed and the watchdog is no longer
/linux-4.4.14/drivers/misc/mei/
H A Dwd.c21 #include <linux/watchdog.h>
50 * mei_wd_host_init - connect to the watchdog client
137 * mei_wd_stop - sends watchdog stop message to fw.
193 * mei_wd_ops_start - wd start command from the watchdog core.
195 * @wd_dev: watchdog device struct
233 * mei_wd_ops_stop - wd stop command from the watchdog core.
235 * @wd_dev: watchdog device struct
255 * mei_wd_ops_ping - wd ping command from the watchdog core.
257 * @wd_dev: watchdog device struct
305 * mei_wd_ops_set_timeout - wd set timeout command from the watchdog core.
307 * @wd_dev: watchdog device struct
373 dev_err(dev->dev, "wd: unable to register watchdog device = %d.\n", mei_watchdog_register()
378 dev_dbg(dev->dev, "wd: successfully register watchdog interface.\n"); mei_watchdog_register()
H A Dmei_dev.h21 #include <linux/watchdog.h>
244 * @timer_count: watchdog timer for operation completion
438 * @wd_cl : watchdog client
439 * @wd_state : watchdog client state
440 * @wd_pending : watchdog command is pending
441 * @wd_timeout : watchdog expiration timeout
442 * @wd_data : watchdog message buffer
667 * mei_watchdog_register - Registering watchdog interface
673 * mei_watchdog_unregister - Unregistering watchdog interface
/linux-4.4.14/arch/x86/kernel/apic/
H A Dhw_nmi.c2 * HW NMI watchdog support
6 * Arch specific calls to support NMI watchdog
/linux-4.4.14/arch/m68k/coldfire/
H A Dreset.c29 /* Set watchdog to soft reset, and enabled */ mcf_cpu_reset()
32 /* wait for watchdog to timeout */; mcf_cpu_reset()
H A Dm5272.c80 /* Set watchdog to reset, and enabled */ m5272_cpu_reset()
85 /* wait for watchdog to timeout */; m5272_cpu_reset()
/linux-4.4.14/include/linux/platform_data/
H A Dintel-mid_wdt.h2 * intel-mid_wdt: generic Intel MID SCU watchdog driver
H A Domap-wd-timer.h22 * and are the only ones needed in the watchdog driver.
/linux-4.4.14/arch/sh/include/cpu-sh3/cpu/
H A Dwatchdog.h2 * include/asm-sh/cpu-sh3/watchdog.h
/linux-4.4.14/arch/mn10300/proc-mn2ws0050/include/proc/
H A Dclock.h8 * 23-Feb-2007 MEI Delete define for watchdog timer.
/linux-4.4.14/include/uapi/linux/
H A Dwatchdog.h2 * Generic watchdog defines. Derived from..
52 #define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */
53 #define WDIOS_ENABLECARD 0x0002 /* Turn on the watchdog timer */
H A Dncp_mount.h30 __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */
53 long wdog_pid; /* Who cares for our watchdog packets? */
/linux-4.4.14/arch/arm/mach-picoxcell/
H A Dcommon.c36 if (WARN(!np, "unable to setup watchdog restart")) picoxcell_setup_restart()
40 WARN(!wdt_regs, "failed to remap watchdog regs"); picoxcell_setup_restart()
70 * Configure the watchdog to reset with the shortest possible timeout picoxcell_wdt_restart()
/linux-4.4.14/kernel/
H A Dwatchdog.c8 * Some chunks also taken from the old x86-specific nmi watchdog code, thanks
12 #define pr_fmt(fmt) "NMI watchdog: " fmt
73 * The 'watchdog_running' variable is set to 1 when the watchdog threads
74 * are registered/started and is set to 0 when the watchdog threads are
79 * If a subsystem has a need to deactivate the watchdog temporarily, it
87 * of 'watchdog_running' cannot change while the watchdog is deactivated
222 /* Commands for resetting the watchdog */ __touch_watchdog()
258 * case we shouldn't have to worry about the watchdog touch_nmi_watchdog()
275 /* watchdog detector functions */ is_hardlockup()
315 /* Ensure the watchdog never gets throttled */ watchdog_overflow_callback()
376 /* watchdog kicker functions */ watchdog_timer_fn()
403 /* Clear the guest paused flag on watchdog reset */ watchdog_timer_fn()
411 * being scheduled. The task touches the watchdog to watchdog_timer_fn()
419 * the watchdog like a soft lockup, check to see if the host watchdog_timer_fn()
535 * The watchdog thread function - touches the timestamp.
542 static void watchdog(unsigned int cpu) watchdog() function
567 * Reduce the watchdog noise by only printing messages
608 * set up the hardware perf event. The watchdog() function checks watchdog_nmi_enable()
670 .thread_fn = watchdog, watchdog_nmi_disable()
671 .thread_comm = "watchdog/%u", watchdog_nmi_disable()
679 * park all watchdog threads that are specified in 'watchdog_cpumask'
681 * This function returns an error if kthread_park() of a watchdog thread
682 * fails. In this situation, the watchdog threads of some CPUs can already
683 * be parked and the watchdog threads of other CPUs can still be runnable.
704 * unpark all watchdog threads that are specified in 'watchdog_cpumask'
718 * Suspend the hard and soft lockup detector by parking the watchdog threads.
728 * the 'watchdog_suspended' variable). If the watchdog threads are lockup_detector_suspend()
750 * Resume the hard and soft lockup detector by unparking the watchdog threads.
758 * The watchdog threads are unparked if they were previously running lockup_detector_resume()
789 pr_err("Failed to create watchdog threads, disabled\n"); watchdog_enable_all_cpus()
845 * common function for watchdog, nmi_watchdog and soft_watchdog parameter
866 /* no parameter changes allowed while watchdog is suspended */ proc_watchdog_common()
922 * /proc/sys/kernel/watchdog
963 /* no parameter changes allowed while watchdog is suspended */ proc_watchdog_thresh()
994 * The cpumask is the mask of possible cpus that the watchdog can run
1008 /* no parameter changes allowed while watchdog is suspended */ proc_watchdog_cpumask()
1044 pr_info("Disabling watchdog on nohz_full cores by default\n"); lockup_detector_init()
H A Dhung_task.c190 /* timeout of 0 will disable the watchdog */ timeout_jiffies()
225 static int watchdog(void *dummy) watchdog() function
247 watchdog_task = kthread_run(watchdog, NULL, "khungtaskd"); hung_task_init()
/linux-4.4.14/arch/mips/include/asm/
H A Dm48t37.h20 volatile u8 watchdog; member in struct:m48t37_rtc
/linux-4.4.14/arch/mips/sibyte/swarm/
H A Drtc_m41t81.c38 #define M41T81REG_WD_RB0 0x01 /* watchdog resolution bit 0 */
39 #define M41T81REG_WD_RB1 0x02 /* watchdog resolution bit 1 */
40 #define M41T81REG_WD_BMB0 0x04 /* watchdog multiplier bit 0 */
41 #define M41T81REG_WD_BMB1 0x08 /* watchdog multiplier bit 1 */
42 #define M41T81REG_WD_BMB2 0x10 /* watchdog multiplier bit 2 */
43 #define M41T81REG_WD_BMB3 0x20 /* watchdog multiplier bit 3 */
44 #define M41T81REG_WD_BMB4 0x40 /* watchdog multiplier bit 4 */
55 #define M41T81REG_FLG_WDF 0x80 /* watchdog flag (read only) */
75 #define M41T81REG_WD 0x09 /* watchdog */
/linux-4.4.14/arch/mn10300/unit-asb2364/include/unit/
H A Dclock.h8 * 23-Feb-2007 MEI Add define for watchdog timer.
/linux-4.4.14/kernel/time/
H A Dclocksource.c114 static struct clocksource *watchdog; variable in typeref:struct:clocksource
133 * If kthread_run fails the next watchdog scan over the clocksource_watchdog_work()
148 * clocksource_mark_unstable - mark clocksource unstable via watchdog
154 * to the watchdog thread.
193 wdnow = watchdog->read(watchdog); clocksource_watchdog()
205 delta = clocksource_delta(wdnow, cs->wd_last, watchdog->mask); clocksource_watchdog()
206 wd_nsec = clocksource_cyc2ns(delta, watchdog->mult, clocksource_watchdog()
207 watchdog->shift); clocksource_watchdog()
219 /* Check the deviation from the watchdog clocksource. */ clocksource_watchdog()
221 pr_warn("timekeeping watchdog: Marking clocksource '%s' as unstable because the skew is too large:\n", clocksource_watchdog()
224 watchdog->name, wdnow, wdlast, watchdog->mask); clocksource_watchdog()
233 (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS)) { clocksource_watchdog()
246 * the watchdog thread reselect it. Due to the clocksource_watchdog()
283 if (watchdog_running || !watchdog || list_empty(&watchdog_list)) clocksource_start_watchdog()
294 if (!watchdog_running || (watchdog && !list_empty(&watchdog_list))) clocksource_stop_watchdog()
323 /* cs is a watchdog. */ clocksource_enqueue_watchdog()
326 /* Pick the best watchdog. */ clocksource_enqueue_watchdog()
327 if (!watchdog || cs->rating > watchdog->rating) { clocksource_enqueue_watchdog()
328 watchdog = cs; clocksource_enqueue_watchdog()
329 /* Reset watchdog cycles */ clocksource_enqueue_watchdog()
333 /* Check if the watchdog timer needs to be started. */ clocksource_enqueue_watchdog()
343 if (cs != watchdog) { clocksource_dequeue_watchdog()
347 /* Check if the watchdog timer needs to be stopped. */ clocksource_dequeue_watchdog()
373 /* Check if the watchdog timer needs to be stopped. */ __clocksource_watchdog_kthread()
377 /* Needs to be done outside of watchdog lock */ __clocksource_watchdog_kthread()
396 return cs == watchdog; clocksource_is_watchdog()
442 * clocksource_touch_watchdog - Update watchdog
444 * Update the watchdog after exception contexts such as kgdb so as not
445 * to incorrectly trip the watchdog. This might fail when the kernel
625 * Run the watchdog first to eliminate unstable clock sources clocksource_done_booting()
/linux-4.4.14/arch/mips/lantiq/falcon/
H A Dreset.c33 /* allow the watchdog driver to find out what the boot reason was */ ltq_reset_cause()
59 /* watchdog magic */ machine_restart()
/linux-4.4.14/arch/sh/kernel/
H A Dreboot.c7 #include <asm/watchdog.h>
36 /* If that fails or is unsupported, go for the watchdog next. */ native_machine_restart()
/linux-4.4.14/arch/arm/mach-pxa/
H A Dreset.c80 /* Initialize the watchdog and let it fire */ do_hw_reset()
86 * SDRAM hangs on watchdog reset on Marvell PXA270 (erratum 71) do_hw_reset()
/linux-4.4.14/drivers/rtc/
H A Drtc-ds1374.c37 #include <linux/watchdog.h>
401 /* Disable any existing watchdog/alarm before setting the new one */ ds1374_wdt_settimeout()
408 /* Set new watchdog time */ ds1374_wdt_settimeout()
411 pr_info("couldn't set new watchdog time\n"); ds1374_wdt_settimeout()
415 /* Enable watchdog timer */ ds1374_wdt_settimeout()
430 * Reload the watchdog timer. (ie, pat the watchdog)
448 /* Disable watchdog timer */ ds1374_wdt_disable()
455 * Watchdog device is opened, and watchdog starts running.
478 * Close the watchdog device.
489 * Pat the watchdog whenever device is written to.
544 pr_info("disable watchdog\n"); ds1374_wdt_ioctl()
549 pr_info("enable watchdog\n"); ds1374_wdt_ioctl()
593 .name = "watchdog",
H A Drtc-stmp3xxx.c73 * stmp3xxx_wdt_set_timeout - configure the watchdog inside the STMP3xxx RTC
74 * @dev: the parent device of the watchdog (= the RTC)
75 * @timeout: the desired value for the timeout register of the watchdog.
76 * 0 disables the watchdog
78 * The watchdog needs one register and two bits which are in the RTC domain.
80 * platform_device for the watchdog driver as a child of the RTC device.
81 * The watchdog driver is passed the below accessor function via platform_data
82 * to configure the watchdog. Locking is not needed because accessing SET/CLR
H A Drtc-m41t80.c32 #include <linux/watchdog.h>
68 #define M41T80_FEATURE_WD (1 << 3) /* Extra watchdog resolution */
367 * Reload counter one with the watchdog timeout. We don't bother reloading
383 i2c_data[0] = 0x09; /* watchdog register */ wdt_ping()
394 * M41T65 has three bits for watchdog resolution. Don't set bit 7, as wdt_ping()
406 * disables watchdog.
444 * @file: file handle to the watchdog
449 * A write to a watchdog device is defined as a keepalive signal. Any
472 * @cmd: watchdog command
475 * The watchdog API defines a common set of functions for all watchdogs
518 pr_info("disable watchdog\n"); wdt_ioctl()
523 pr_info("enable watchdog\n"); wdt_ioctl()
613 .name = "watchdog",
/linux-4.4.14/drivers/hwmon/
H A Dsch56xx-common.c30 #include <linux/watchdog.h>
262 all references to our watchdog device are released */ watchdog_release_resources()
306 * the watchdog countdown. watchdog_set_timeout()
321 * The sch56xx's watchdog cannot really be started / stopped watchdog_start()
325 * The sch56xx's watchdog will set the watchdog event bit, bit 0 watchdog_start()
332 * This means we must clear the watchdog event bit in case it is set. watchdog_start()
341 /* 1. Reset the watchdog countdown counter */ watchdog_start()
356 /* 3. Clear the watchdog event bit if set */ watchdog_start()
371 /* Reset the watchdog countdown counter */ watchdog_trigger()
428 /* Cache the watchdog registers */ sch56xx_watchdog_register()
453 strlcpy(data->wdinfo.identity, "sch56xx watchdog", sch56xx_watchdog_register()
471 /* Since the watchdog uses a downcounter there is no register to read sch56xx_watchdog_register()
485 pr_err("Registering watchdog chardev: %d\n", err); sch56xx_watchdog_register()
H A Dfschmd.c47 #include <linux/watchdog.h>
79 /* watchdog */
287 u8 watchdog_control; /* watchdog control register */
288 u8 watchdog_state; /* watchdog status register */
289 u8 watchdog_preset; /* watchdog counter preset on trigger val */
322 * references to our watchdog device are released
800 * Don't store the stop flag in our watchdog control register copy, as watchdog_stop()
839 /* Start the watchdog */ watchdog_open()
856 "unexpected close, not stopping watchdog!\n"); watchdog_release()
902 .identity = "FSC watchdog" watchdog_ioctl()
1119 * Store client pointer in our data struct for watchdog usage fschmd_probe()
1228 /* Register our watchdog part */ fschmd_probe()
1230 "watchdog%c", (i == 0) ? '\0' : ('0' + i)); fschmd_probe()
1240 "Registering watchdog chardev: %d\n", err); fschmd_probe()
1247 "Registered watchdog chardev major 10, minor: %d\n", fschmd_probe()
1254 "Couldn't register watchdog chardev (due to no free minor)\n"); fschmd_probe()
1273 /* Unregister the watchdog (if registered) */ fschmd_remove()
1278 "i2c client detached with watchdog open! " fschmd_remove()
1279 "Stopping watchdog.\n"); fschmd_remove()
1285 /* Tell the watchdog code the client is gone */ fschmd_remove()
/linux-4.4.14/arch/sparc/kernel/
H A Dnmi.c5 * The NMI watchdog support and infrastructure is based almost
39 * >0: the NMI watchdog is active, but can be disabled
40 * <0: the NMI watchdog has not been set up, and cannot be enabled
41 * 0: the NMI watchdog is disabled, but can be enabled
175 printk(KERN_INFO "Testing NMI watchdog ... "); check_nmi_watchdog()
/linux-4.4.14/arch/m68k/mvme147/
H A Dconfig.c68 m147_pcc->watchdog = 0x0a; /* Clear timer */ mvme147_reset()
69 m147_pcc->watchdog = 0xa5; /* Enable watchdog - 100ms to reset */ mvme147_reset()
/linux-4.4.14/arch/um/drivers/
H A Dharddog_kern.c1 /* UML hardware watchdog, shamelessly stolen from:
19 * Software only watchdog driver. Unlike its big brother the WDT501P
43 #include <linux/watchdog.h>
175 .name = "watchdog",
H A Dharddog_user.c80 printk("harddog_open - EOF on watchdog pipe\n"); start_watchdog()
86 printk("harddog_open - read of watchdog pipe failed, " start_watchdog()
/linux-4.4.14/arch/sh/include/asm/
H A Dwatchdog.h2 * include/asm-sh/watchdog.h
27 #include <cpu/watchdog.h>
30 * See cpu-sh2/watchdog.h for explanation of this stupidity..
41 * CKS0-2 supports a number of clock division ratios. At the time the watchdog
/linux-4.4.14/arch/sh/include/cpu-sh4/cpu/
H A Dwatchdog.h2 * include/asm-sh/cpu-sh4/watchdog.h
/linux-4.4.14/arch/mips/loongson32/common/
H A Dreset.c45 panic("Failed to remap watchdog registers"); ls1x_reboot_setup()
/linux-4.4.14/arch/arm/mach-omap1/
H A Dreset.c44 * format is standardized across OMAPs for use by the OMAP watchdog.
/linux-4.4.14/drivers/power/reset/
H A Dltc2952-poweroff.c36 * watchdog toggle immediately. The chip will only power off the system if
39 * - watchdog (output)
95 * Toggles the watchdog reset signal each wde_interval
189 data->gpio_watchdog = devm_gpiod_get(&pdev->dev, "watchdog", ltc2952_poweroff_init()
193 dev_err(&pdev->dev, "unable to claim gpio \"watchdog\"\n"); ltc2952_poweroff_init()
234 * start the watchdog trigger. ltc2952_poweroff_init()
/linux-4.4.14/arch/mips/txx9/generic/
H A Dsetup_tx4927.c30 /* report watchdog reset status */ tx4927_wdr_init()
36 /* do reset on watchdog */ tx4927_wdr_init()
48 pr_emerg("Rebooting (with %s watchdog reset)...\n", tx4927_machine_restart()
51 /* clear watchdog status */ tx4927_machine_restart()
58 pr_emerg("Rebooting (with internal watchdog reset)...\n"); tx4927_machine_restart()
59 /* External WDRST failed. Do internal watchdog reset */ tx4927_machine_restart()
H A Dsetup_tx4938.c32 /* report watchdog reset status */ tx4938_wdr_init()
38 /* do reset on watchdog */ tx4938_wdr_init()
50 pr_emerg("Rebooting (with %s watchdog reset)...\n", tx4938_machine_restart()
53 /* clear watchdog status */ tx4938_machine_restart()
60 pr_emerg("Rebooting (with internal watchdog reset)...\n"); tx4938_machine_restart()
61 /* External WDRST failed. Do internal watchdog reset */ tx4938_machine_restart()
/linux-4.4.14/arch/powerpc/platforms/52xx/
H A Dmpc52xx_gpt.c21 * The timer gpt0 can be used as watchdog (wdt). If the wdt mode is used,
67 #include <linux/watchdog.h>
483 /* reject the operation if the timer is used as watchdog (gpt 0 only) */ mpc52xx_gpt_stop_timer()
527 #define WDT_IDENTITY "mpc52xx watchdog on GPT0"
529 /* wdt_is_active stores whether or not the /dev/watchdog device is opened */
623 /* /dev/watchdog can only be opened once */ mpc52xx_wdt_open()
627 /* Set and activate the watchdog with 30 seconds timeout */ mpc52xx_wdt_open()
668 .name = "watchdog",
676 /* try to register the watchdog misc device */ mpc52xx_gpt_wdt_init()
679 pr_err("%s: cannot register watchdog device\n", WDT_IDENTITY); mpc52xx_gpt_wdt_init()
681 pr_info("%s: watchdog device registered\n", WDT_IDENTITY); mpc52xx_gpt_wdt_init()
701 dev_info(gpt->dev, "watchdog set to %us timeout\n", *period); mpc52xx_gpt_wdt_setup()
747 /* check if this device could be a watchdog */ mpc52xx_gpt_probe()
756 dev_info(gpt->dev, "used as watchdog\n"); mpc52xx_gpt_probe()
759 dev_info(gpt->dev, "can function as watchdog\n"); mpc52xx_gpt_probe()
/linux-4.4.14/drivers/char/ipmi/
H A Dipmi_watchdog.c4 * A watchdog timer based upon the IPMI interface.
39 #include <linux/watchdog.h>
60 * that can reasonably support the IPMI NMI watchdog timeout at this
75 * The IPMI command/response information for the watchdog timer.
127 * Setting/getting the watchdog timer value. This is for bytes 5 and
289 MODULE_PARM_DESC(ifnum_to_use, "The interface number to use for the watchdog "
315 MODULE_PARM_DESC(start_now, "Set to 1 to start the watchdog as"
328 /* Is someone using the watchdog? Only one user is allowed. */
402 * In ipmi 1.0, setting the timer stops the watchdog, we i_ipmi_set_timeout()
505 * re-enables the watchdog. panic_halt_ipmi_heartbeat()
559 "Unable to extend the watchdog timeout."); panic_halt_ipmi_set_timeout()
625 * re-enables the watchdog. ipmi_heartbeat()
662 " watchdog's settings, giving up.\n"); ipmi_heartbeat()
669 * probably reset and lost the watchdog information. Attempt ipmi_heartbeat()
678 " set the watchdog's settings, giving up.\n"); ipmi_heartbeat()
920 "Unexpected close, not stopping watchdog!\n"); ipmi_close()
945 .name = "watchdog",
956 " the watchdog timer\n"); ipmi_wdog_msg_handler()
1135 * watchdog. ipmi_nmi()
1166 reboot if it hangs, but only if the watchdog wdog_reboot_handler()
1190 the watchdog timer to a reasonable value to complete the wdog_panic_handler()
1191 panic, if the watchdog timer is running. Plus the wdog_panic_handler()
1391 MODULE_DESCRIPTION("watchdog timer based upon the IPMI interface.");
/linux-4.4.14/arch/mips/include/asm/netlogic/xlp-hal/
H A Dpic.h46 #define PIC_CTRL_WWR1 8 /* watchdog 1 wraparound count for reset */
47 #define PIC_CTRL_WWR0 6 /* watchdog 0 wraparound count for reset */
48 #define PIC_CTRL_WWN1 4 /* watchdog 1 wraparound count for NMI */
49 #define PIC_CTRL_WWN0 2 /* watchdog 0 wraparound count for NMI */
50 #define PIC_CTRL_WTE 0 /* watchdog timer enable */
56 #define PIC_WNS_STATUS 2 /* NMI status for watchdog timers */
57 #define PIC_WIS_STATUS 0 /* Interrupt status for watchdog timers */
/linux-4.4.14/drivers/clocksource/
H A Dtimer-digicolor.c22 * "Timer H". Timer A is the only one with watchdog support, so it is dedicated
23 * to the watchdog driver. This driver uses Timer B for sched_clock(), and
158 * timer registers are shared with the watchdog timer; digicolor_timer_init()
/linux-4.4.14/arch/cris/kernel/
H A Dtraps.c185 * This gets called from entry.S when the watchdog has bitten. Show something
212 * the watchdog normally. If NICE_DOGGY is set, simply die_if_kernel()
213 * stop the watchdog during the printout. die_if_kernel()
/linux-4.4.14/arch/arm/mach-footbridge/
H A Dcommon.c206 * Force the watchdog to do a CPU reset. footbridge_restart()
208 * After making sure that the watchdog is disabled footbridge_restart()
214 * enabled as the watchdog. footbridge_restart()
/linux-4.4.14/drivers/scsi/
H A Dt128.h58 #define T_CR_CT 0x02 /* Reset watchdog timer */
67 #define T_ST_TIM 0x02 /* indicates 40us watchdog timer fired */
/linux-4.4.14/arch/x86/kernel/cpu/
H A DMakefile59 obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o perf_event_amd_ibs.o
/linux-4.4.14/include/linux/mfd/wm831x/
H A Dwatchdog.h2 * include/linux/mfd/wm831x/watchdog.h -- Watchdog for WM831x
/linux-4.4.14/include/linux/rtc/
H A Dm48t59.h43 #define M48T59_FLAGS_WDT 0x80 /* watchdog timer expired */
/linux-4.4.14/arch/sh/include/cpu-sh2/cpu/
H A Dwatchdog.h2 * include/asm-sh/cpu-sh2/watchdog.h
/linux-4.4.14/arch/m68k/include/asm/
H A Dmvme147hw.h39 volatile u_char watchdog; member in struct:pcc_regs
/linux-4.4.14/arch/arm/plat-samsung/include/plat/
H A Dmap-base.h37 #define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */
/linux-4.4.14/arch/arm/mach-s3c24xx/
H A Ds3c2440.c53 /* change irq for watchdog */ s3c2440_init()
/linux-4.4.14/arch/arm/mach-s3c64xx/
H A Dmach-s3c64xx-dt.c21 #include "watchdog-reset.h"
/linux-4.4.14/arch/arm/mach-bcm/
H A Dboard_bcm281xx.c47 /* Enable watchdog with short timeout (244us). */ bcm281xx_restart()
/linux-4.4.14/include/linux/mfd/da9063/
H A Dcore.h26 #define DA9063_DRVNAME_WATCHDOG "da9063-watchdog"
/linux-4.4.14/arch/c6x/platforms/
H A Dplldata.c139 .name = "watchdog",
164 CLK("watchdog", NULL, &c6x_watchdog_clk),
203 CLK("watchdog", NULL, &c6x_watchdog_clk),
248 CLK("watchdog", NULL, &c6x_watchdog_clk),
302 CLK("watchdog", NULL, &c6x_watchdog_clk),
/linux-4.4.14/arch/sparc/include/asm/
H A Dbbc.h87 /* Watchdog Action register. When the watchdog device timer expires
91 #define BBC_WDACTION_RST 0x01 /* When set, watchdog causes system reset.
92 * When clear, BBC ignores watchdog signal.
138 #define BBC_PSRC_WDT 0x10000 /* System reset via Super I/O watchdog */
152 * a) Super I/O watchdog fired, or
/linux-4.4.14/arch/arm/mach-davinci/
H A Dtime.c413 /* reset board using watchdog timer */ davinci_watchdog_reset()
432 /* reset timer, set mode to 64-bit watchdog, and unreset */ davinci_watchdog_reset()
446 /* put watchdog in pre-active state */ davinci_watchdog_reset()
452 /* put watchdog in active state */ davinci_watchdog_reset()
458 * a watchdog reset */ davinci_watchdog_reset()
/linux-4.4.14/drivers/usb/host/
H A Dehci-timer.c334 * So we need this watchdog, but must protect it against both ehci_iaa_watchdog()
336 * (b) clean HC shutdown, when IAA watchdog was pending. ehci_iaa_watchdog()
351 * after the watchdog timer expired (_way_ late, so we'll ehci_iaa_watchdog()
362 ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd); ehci_iaa_watchdog()
367 /* Enable the I/O watchdog, if appropriate */ turn_on_io_watchdog()
377 * Isochronous transfers always need the watchdog. turn_on_io_watchdog()

Completed in 7877 milliseconds

1234