Lines Matching +full:watchdog +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0-only
3 * VIA Chipset Watchdog Driver
10 * 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 */
33 * The MMIO region contains the watchdog control register and the
42 #define VIA_WDT_FIRED 0x02 /* 1: restarted by expired watchdog */
58 MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds, between 1 and 1023 "
63 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
72 /* The timer that pings the watchdog */
83 * Timer tick: the timer will make sure that the watchdog timer hardware
85 * 1) the watchdog timer has been started and /dev/watchdog is open
89 * 2) the watchdog timer has been stopped by userspace.
104 next_heartbeat = jiffies + wdd->timeout * HZ; in wdt_ping()
112 writel(wdd->timeout, wdt_mem + VIA_WDT_COUNT); in wdt_start()
131 wdd->timeout = new_timeout; in wdt_set_timeout()
136 .identity = "VIA watchdog",
162 int ret = -ENODEV; in wdt_probe()
165 dev_err(&pdev->dev, "cannot enable PCI device\n"); in wdt_probe()
166 return -ENODEV; in wdt_probe()
170 * Allocate a MMIO region which contains watchdog control register in wdt_probe()
171 * and counter, then configure the watchdog to use this region. in wdt_probe()
173 * If not, the watchdog must be configured in BIOS manually. in wdt_probe()
177 dev_err(&pdev->dev, "MMIO allocation failed\n"); in wdt_probe()
188 dev_info(&pdev->dev, "VIA Chipset watchdog MMIO: %x\n", mmio); in wdt_probe()
190 dev_err(&pdev->dev, "MMIO setting failed. Check BIOS.\n"); in wdt_probe()
195 dev_err(&pdev->dev, "MMIO region busy\n"); in wdt_probe()
201 dev_err(&pdev->dev, "cannot remap VIA wdt MMIO registers\n"); in wdt_probe()
209 wdt_dev.parent = &pdev->dev; in wdt_probe()
218 /* start triggering, in case of watchdog already enabled by BIOS */ in wdt_probe()
260 MODULE_DESCRIPTION("Driver for watchdog timer on VIA chipset");