Lines Matching +full:reset +full:- +full:n +full:- +full:io

1 // SPDX-License-Identifier: GPL-2.0+
5 * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
10 * "AS-IS" and at no charge.
44 #include <linux/io.h>
71 /* You must set these - there is no sane way to probe for this board. */
72 static int io = 0x240; variable
77 module_param_hw(io, int, ioport, 0);
78 MODULE_PARM_DESC(io, "WDT io port (default=0x240)");
82 /* Support for the Fan Tachometer on the WDT501-P */
86 "WDT501-P Fan Tachometer support (0=disable, default=0)");
91 "WDT501-P Card type (500 or 501, default=500)");
130 wdt_ctr_load(2, 65535); /* Length of reset pulse */ in wdt_start()
148 wdt_ctr_load(2, 0); /* 0 length reset pulses now */ in wdt_stop()
166 wdt_ctr_mode(1, 2); /* Re-Program CTR1 for Mode 2: in wdt_ping()
178 * value is incorrect we keep the old value and return -EINVAL. If
185 return -EINVAL; in wdt_set_heartbeat()
252 pr_crit("Overheat alarm (%d)\n", inb_p(WDT_RT)); in wdt_decode_501()
254 pr_crit("PSU over voltage\n"); in wdt_decode_501()
256 pr_crit("PSU under voltage\n"); in wdt_decode_501()
280 pr_crit("WDT status %d\n", status); in wdt_interrupt()
286 pr_crit("Possible fan fault\n"); in wdt_interrupt()
292 pr_crit("Would Reboot\n"); in wdt_interrupt()
294 pr_crit("Initiating system reboot\n"); in wdt_interrupt()
298 pr_crit("Reset in 5ms\n"); in wdt_interrupt()
330 return -EFAULT; in wdt_write()
377 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; in wdt_ioctl()
388 return -EFAULT; in wdt_ioctl()
390 return -EINVAL; in wdt_ioctl()
396 return -ENOTTY; in wdt_ioctl()
408 * triggers counter 2 downcounts the length of the reset pulse which
415 return -EBUSY; in wdt_open()
441 pr_crit("WDT device closed unexpectedly. WDT will not stop!\n"); in wdt_release()
465 return -EFAULT; in wdt_temp_read()
505 * trust me - if it happens it does suck.
575 release_region(io, 8); in wdt_exit()
591 pr_err("unknown card type '%d'\n", type); in wdt_init()
592 return -ENODEV; in wdt_init()
596 if not reset to the default */ in wdt_init()
599 pr_info("heartbeat value must be 0 < heartbeat < 65536, using %d\n", in wdt_init()
603 if (!request_region(io, 8, "wdt501p")) { in wdt_init()
604 pr_err("I/O address 0x%04x already in use\n", io); in wdt_init()
605 ret = -EBUSY; in wdt_init()
611 pr_err("IRQ %d is not free\n", irq); in wdt_init()
617 pr_err("cannot register reboot notifier (err=%d)\n", ret); in wdt_init()
624 pr_err("cannot register miscdev on minor=%d (err=%d)\n", in wdt_init()
632 pr_err("cannot register miscdev on minor=%d (err=%d)\n", in wdt_init()
637 pr_info("WDT500/501-P driver 0.10 at 0x%04x (Interrupt %d). heartbeat=%d sec (nowayout=%d)\n", in wdt_init()
638 io, irq, heartbeat, nowayout); in wdt_init()
640 pr_info("Fan Tachometer is %s\n", in wdt_init()
652 release_region(io, 8); in wdt_init()