Lines Matching +full:max +full:- +full:heartbeat +full:- +full:sec

1 // SPDX-License-Identifier: GPL-2.0-only
29 #define DRV_NAME "PIKA-WDT"
34 /* Timer heartbeat (500ms) */
39 static int heartbeat = WDT_HEARTBEAT; variable
40 module_param(heartbeat, int, 0);
41 MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. "
71 /* -- FPGA: Reset Control Register (32bit R/W) (Offset: 0x14) -- in pikawdt_reset()
76 * Bit 8-11, WTCHDG_TIMEOUT_SEC: Sets the watchdog timeout value in in pikawdt_reset()
81 /* enable with max timeout - 15 seconds */ in pikawdt_reset()
102 pikawdt_private.next_heartbeat = jiffies + heartbeat * HZ; in pikawdt_keepalive()
118 return -EBUSY; in pikawdt_open()
157 return -EFAULT; in pikawdt_write()
171 * Handle commands from user-space.
182 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; in pikawdt_ioctl()
196 return -EFAULT; in pikawdt_ioctl()
198 heartbeat = new_value; in pikawdt_ioctl()
204 return put_user(heartbeat, p); in pikawdt_ioctl()
206 return -ENOTTY; in pikawdt_ioctl()
235 return -ENOENT; in pikawdt_init()
242 return -ENOMEM; in pikawdt_init()
248 np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd"); in pikawdt_init()
250 pr_err("Unable to find fpga-sd\n"); in pikawdt_init()
251 ret = -ENOENT; in pikawdt_init()
258 pr_err("Unable to map fpga-sd\n"); in pikawdt_init()
259 ret = -ENOMEM; in pikawdt_init()
263 /* -- FPGA: POST Test Results Register 1 (32bit R/W) (Offset: 0x4040) -- in pikawdt_init()
281 pr_info("initialized. heartbeat=%d sec (nowayout=%d)\n", in pikawdt_init()
282 heartbeat, nowayout); in pikawdt_init()