Lines Matching +full:timeout +full:- +full:secs

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Watchdog timer for PowerPC Book-E systems
8 * Copyright 2005, 2008, 2010-2011 Freescale Semiconductor Inc.
22 * Also, the wdt_period sets the watchdog timer period timeout.
23 * For E500 cpus the wdt_period sets which bit changing from 0->1 will
24 * trigger a watchdog timeout. This watchdog timeout will occur 3 times, the
55 * 2.5 * (2^(63-period+1)) / timebase_freq
58 * at least 1. This will still result in a very long timeout.
62 unsigned long long tmp = 1ULL << (64 - period); in period_to_sec()
75 * This procedure will find the highest period which will give a timeout
77 * a parameter of 2 secs, then this procedure will return a value of 38.
79 static unsigned int sec_to_period(unsigned int secs) in sec_to_period() argument
82 for (period = 63; period > 0; period--) { in sec_to_period()
83 if (period_to_sec(period) >= secs) in sec_to_period()
98 static unsigned int sec_to_period(unsigned int secs) in sec_to_period() argument
100 return secs; in sec_to_period()
114 val |= WDTP(sec_to_period(wdog->timeout)); in __booke_wdt_set()
145 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(sec_to_period(wdog->timeout))); in __booke_wdt_enable()
151 * __booke_wdt_disable - disable the watchdog on the given CPU
155 * TCR[WRC] cannot be changed once it has been set to non-zero, but we can
174 pr_debug("watchdog enabled (timeout = %u sec)\n", wdog->timeout); in booke_wdt_start()
188 unsigned int timeout) in booke_wdt_set_timeout() argument
190 wdt_dev->timeout = timeout; in booke_wdt_set_timeout()
198 .identity = "PowerPC Book-E Watchdog",
224 pr_info("powerpc book-e watchdog driver loaded\n"); in booke_wdt_init()
225 booke_wdt_info.firmware_version = cur_cpu_spec->pvr_value; in booke_wdt_init()
242 MODULE_DESCRIPTION("PowerPC Book-E watchdog driver");