Lines Matching +full:timer +full:- +full:watchdog

1 // SPDX-License-Identifier: GPL-2.0+
3 * Watchdog driver for the SA11x0/PXA2xx
10 * "AS-IS" and at no charge.
27 #include <linux/watchdog.h>
34 #define REG_OSMR0 0x0000 /* OS timer Match Reg. 0 */
35 #define REG_OSMR1 0x0004 /* OS timer Match Reg. 1 */
36 #define REG_OSMR2 0x0008 /* OS timer Match Reg. 2 */
37 #define REG_OSMR3 0x000c /* OS timer Match Reg. 3 */
38 #define REG_OSCR 0x0010 /* OS timer Counter Reg. */
39 #define REG_OSSR 0x0014 /* OS timer Status Reg. */
40 #define REG_OWER 0x0018 /* OS timer Watch-dog Enable Reg. */
41 #define REG_OIER 0x001C /* OS timer Interrupt Enable Reg. */
48 #define OWER_WME (1 << 0) /* Watchdog Match Enable */
77 return -EBUSY; in sa1100dog_open()
79 /* Activate SA1100 Watchdog timer */ in sa1100dog_open()
88 * The watchdog cannot be disabled.
91 * clearing REG_OIER[E3] would prevent the watchdog timing out but this
96 pr_crit("Device closed - timer will not stop\n"); in sa1100dog_release()
105 /* Refresh OSMR3 timer. */ in sa1100dog_write()
113 .identity = "SA1100/PXA255 Watchdog",
120 int ret = -ENOTTY; in sa1100dog_ioctl()
128 sizeof(ident)) ? -EFAULT : 0; in sa1100dog_ioctl()
150 ret = -EINVAL; in sa1100dog_ioctl()
176 .name = "watchdog",
191 return -ENXIO; in sa1100dog_probe()
192 reg_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); in sa1100dog_probe()
194 return -ENOMEM; in sa1100dog_probe()
198 pr_err("SA1100/PXA2xx Watchdog Timer: clock not found: %d\n", in sa1100dog_probe()
205 pr_err("SA1100/PXA2xx Watchdog Timer: clock failed to prepare+enable: %d\n", in sa1100dog_probe()
212 platform_data = pdev->dev.platform_data; in sa1100dog_probe()
219 pr_info("SA1100/PXA2xx Watchdog Timer: timer margin %d sec\n", in sa1100dog_probe()
245 MODULE_DESCRIPTION("SA1100/PXA2xx Watchdog");
248 MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)");