• Home
  • Raw
  • Download

Lines Matching +full:close +full:- +full:range

1 // SPDX-License-Identifier: GPL-2.0-only
5 * - AF82MP20 PCH
7 * Copyright (C) 2009-2010 Intel Corporation. All rights reserved.
35 #include <asm/intel-mid.h>
50 "The range is from 1 to 160"
58 "The range is from 1 to 170"
62 * force_boot == 0, then force boot on next watchdog interrupt after close,
99 (new_margin > MAX_TIME - timer_set)) { in check_timer_margin()
100 pr_debug("value of new_margin %d is out of the range %d to %d\n", in check_timer_margin()
101 new_margin, MIN_TIME_CYCLE, MAX_TIME - timer_set); in check_timer_margin()
102 return -EINVAL; in check_timer_margin()
171 /* read eoi register - clears interrupt */ in intel_scu_keepalive()
202 timer_margin * watchdog_device.timer_tbl_ptr->freq_hz; in intel_scu_set_heartbeat()
204 (watchdog_device.timer_set - timer_margin) in intel_scu_set_heartbeat()
205 * watchdog_device.timer_tbl_ptr->freq_hz; in intel_scu_set_heartbeat()
208 watchdog_device.timer_tbl_ptr->freq_hz); in intel_scu_set_heartbeat()
251 return -ENODEV; in intel_scu_set_heartbeat()
285 return -EBUSY; in intel_scu_open()
289 return -EPERM; in intel_scu_open()
307 return -ENOTTY; in intel_scu_release()
311 /* Just close, since timer has not been started */ in intel_scu_release()
316 pr_crit("Unexpected close of /dev/watchdog!\n"); in intel_scu_release()
368 sizeof(ident)) ? -EFAULT : 0; in intel_scu_ioctl()
378 return -EFAULT; in intel_scu_ioctl()
381 return -EINVAL; in intel_scu_ioctl()
384 return -EINVAL; in intel_scu_ioctl()
390 return -ENOTTY; in intel_scu_ioctl()
432 return -ENODEV; in intel_scu_watchdog_init()
435 /* are in range. */ in intel_scu_watchdog_init()
438 (timer_set > MAX_TIME - MIN_TIME_CYCLE)) { in intel_scu_watchdog_init()
439 pr_err("value of timer_set %x (hex) is out of range from %x to %x (hex)\n", in intel_scu_watchdog_init()
440 timer_set, MIN_TIME_CYCLE, MAX_TIME - MIN_TIME_CYCLE); in intel_scu_watchdog_init()
441 return -EINVAL; in intel_scu_watchdog_init()
446 return -EINVAL; in intel_scu_watchdog_init()
448 watchdog_device.timer_tbl_ptr = sfi_get_mtmr(sfi_mtimer_num-1); in intel_scu_watchdog_init()
452 return -ENODEV; in intel_scu_watchdog_init()
455 if (watchdog_device.timer_tbl_ptr->phys_addr == 0) { in intel_scu_watchdog_init()
458 return -ENODEV; in intel_scu_watchdog_init()
461 if (watchdog_device.timer_tbl_ptr->irq == 0) { in intel_scu_watchdog_init()
463 return -ENODEV; in intel_scu_watchdog_init()
466 tmp_addr = ioremap(watchdog_device.timer_tbl_ptr->phys_addr, in intel_scu_watchdog_init()
471 return -ENOMEM; in intel_scu_watchdog_init()
484 timer_margin * watchdog_device.timer_tbl_ptr->freq_hz; in intel_scu_watchdog_init()
486 (watchdog_device.timer_set - timer_margin) in intel_scu_watchdog_init()
487 * watchdog_device.timer_tbl_ptr->freq_hz; in intel_scu_watchdog_init()
510 ret = request_irq((unsigned int)watchdog_device.timer_tbl_ptr->irq, in intel_scu_watchdog_init()