Home
last modified time | relevance | path

Searched full:timer (Results 1 – 25 of 1672) sorted by relevance

12345678910>>...67

/openbmc/u-boot/drivers/timer/
H A DKconfig1 menu "Timer Support"
3 config TIMER config
4 bool "Enable driver model for timer drivers"
7 Enable driver model for timer access. It uses the same API as
8 lib/time.c, but now implemented by the uclass. The first timer
9 will be used. The timer is usually a 32 bits free-running up
10 counter. There may be no real tick, and no timer interrupt.
13 bool "Enable driver model for timer drivers in SPL"
14 depends on TIMER && SPL
16 Enable support for timer drivers in SPL. These can be used to get
[all …]
H A Drockchip_timer.c10 #include <asm/arch/timer.h>
12 #include <timer.h>
23 /* Driver private data. Contains timer id. Could be either 0 or 1. */
25 struct rk_timer *timer; member
28 static inline int64_t rockchip_timer_get_curr_value(struct rk_timer *timer) in rockchip_timer_get_curr_value() argument
33 timebase_l = readl(&timer->timer_curr_value0); in rockchip_timer_get_curr_value()
34 timebase_h = readl(&timer->timer_curr_value1); in rockchip_timer_get_curr_value()
51 /* The timer is available */ in timer_get_boot_us()
52 rate = timer_get_rate(gd->timer); in timer_get_boot_us()
53 timer_get_count(gd->timer, &ticks); in timer_get_boot_us()
[all …]
/openbmc/sdeventplus/src/sdeventplus/utility/
H A Dtimer.hpp23 /** @class Timer<Id>
24 * @brief A simple, repeating timer around an sd_event time source
25 * @details Adds a timer to the SdEvent loop that runs a user defined callback
26 * at specified intervals. If no interval is provided to the timer,
28 * timer tracks whether or not it has expired since creation or since
35 class Timer class
38 /** @brief Type used to represent a time duration for the timer
44 * timer elapses.
46 using Callback = fu2::unique_function<void(Timer<Id>&)>;
48 /** @brief Creates a new timer on the given event loop.
[all …]
H A Dtimer.cpp3 #include <sdeventplus/utility/timer.hpp>
15 Timer<Id>::Timer(const Event& event, Callback&& callback, in Timer() function in sdeventplus::utility::Timer
36 Timer<Id>::Timer(const Timer<Id>& other, sdeventplus::internal::NoOwn) : in Timer() function in sdeventplus::utility::Timer
42 void Timer<Id>::set_callback(Callback&& callback) in set_callback()
48 const Event& Timer<Id>::get_event() const in get_event()
54 bool Timer<Id>::get_floating() const in get_floating()
60 void Timer<Id>::set_floating(bool b) in set_floating()
66 bool Timer<Id>::hasExpired() const in hasExpired()
72 bool Timer<Id>::isEnabled() const in isEnabled()
78 std::optional<typename Timer<Id>::Duration> Timer<Id>::getInterval() const in getInterval()
[all …]
/openbmc/sdbusplus/include/sdbusplus/
H A Dtimer.hpp12 /** @class Timer
15 class Timer class
18 /** @brief Only need the default Timer */
19 Timer() = delete;
20 Timer(const Timer&) = delete;
21 Timer& operator=(const Timer&) = delete;
22 Timer(Timer&&) = delete;
23 Timer& operator=(Timer&&) = delete;
25 /** @brief Constructs timer object
28 * @param[in] userCallBack - optional function callback for timer
[all …]
/openbmc/qemu/hw/sparc64/
H A Dsparc64.c31 #include "qemu/timer.h"
85 CPUTimer *timer = g_new0(CPUTimer, 1); in cpu_timer_create() local
87 timer->name = name; in cpu_timer_create()
88 timer->frequency = frequency; in cpu_timer_create()
89 timer->disabled_mask = disabled_mask; in cpu_timer_create()
90 timer->npt_mask = npt_mask; in cpu_timer_create()
92 timer->disabled = 1; in cpu_timer_create()
93 timer->npt = 1; in cpu_timer_create()
94 timer->clock_offset = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in cpu_timer_create()
96 timer->qtimer = timer_new_ns(QEMU_CLOCK_VIRTUAL, cb, cpu); in cpu_timer_create()
[all …]
/openbmc/sdeventplus/test/utility/
H A Dtimer.cpp6 #include <sdeventplus/utility/timer.hpp>
32 using TestTimer = Timer<testClock>;
63 std::unique_ptr<TestTimer> timer; member in sdeventplus::utility::__anon9ead1e020111::TimerTest
98 if (timer) in resetTimer()
100 timer.reset(); in resetTimer()
111 EXPECT_TRUE(timer->hasExpired()); in expireTimer()
112 EXPECT_EQ(interval, timer->getInterval()); in expireTimer()
135 // dynamically, without changing it inside the timer in SetUp()
151 timer = std::make_unique<TestTimer>(*event, runCallback, interval); in SetUp()
152 EXPECT_EQ(expected_event, timer->get_event().get()); in SetUp()
[all …]
/openbmc/qemu/include/hw/timer/
H A Dnpcm7xx_timer.h2 * Nuvoton NPCM7xx Timer Controller
21 #include "qemu/timer.h"
23 /* Each Timer Module (TIM) instance holds five 25 MHz timers. */
32 /* The basic watchdog timer period is 2^14 clock cycles. */
40 * struct NPCM7xxBaseTimer - Basic functionality that both regular timer and
41 * watchdog timer use.
42 * @qtimer: QEMU timer that notifies us on expiration.
44 * @remaining_ns: Remaining time until expiration if timer is paused.
53 * struct NPCM7xxTimer - Individual timer state.
54 * @ctrl: The timer module that owns this timer.
[all …]
/openbmc/qemu/net/
H A Dannounce.c20 int64_t qemu_announce_timer_step(AnnounceTimer *timer) in qemu_announce_timer_step() argument
24 step = timer->params.initial + in qemu_announce_timer_step()
25 (timer->params.rounds - timer->round - 1) * in qemu_announce_timer_step()
26 timer->params.step; in qemu_announce_timer_step()
28 if (step < 0 || step > timer->params.max) { in qemu_announce_timer_step()
29 step = timer->params.max; in qemu_announce_timer_step()
31 timer_mod(timer->tm, qemu_clock_get_ms(timer->type) + step); in qemu_announce_timer_step()
37 * If 'free_named' is true, then remove the timer from the list
38 * and free the timer itself.
40 void qemu_announce_timer_del(AnnounceTimer *timer, bool free_named) in qemu_announce_timer_del() argument
[all …]
/openbmc/u-boot/drivers/watchdog/
H A DKconfig1 menu "Watchdog Timer Support"
52 bool "Enable driver model for watchdog timer drivers"
55 Enable driver model for watchdog timer. At the moment the API
58 What exactly happens when the timer expires is up to a particular
62 bool "Enable Watchdog Timer support for Sandbox"
65 Enable Watchdog Timer support in Sandbox. This is a dummy device that
70 bool "Marvell Armada 37xx watchdog timer support"
73 Enable this to support Watchdog Timer on Marvell Armada 37xx SoC.
79 bool "Aspeed ast2400/ast2500 watchdog timer support"
83 Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
[all …]
/openbmc/phosphor-fan-presence/control/json/actions/
H A Dtimer_based_actions.hpp36 * @class TimerBasedActions - Action that wraps a list of actions with a timer
38 * Sets up a list of actions to be invoked when the defined timer expires.
39 * Once for a `oneshot` timer or at each expiration of a `repeating` timer.
57 * @brief Call actions when timer expires
67 * Starts or stops a timer that runs a list of actions whenever the
68 * timer expires. The configured timer is set to callback the list of
72 * the groups' service owned state is used to start/stop the timer. When any
73 * service providing a group member is not owned, the timer is started and
74 * if all members' services are owned, the timer is stopped.
77 * compared against all members within each group to start/stop the timer.
[all …]
/openbmc/u-boot/include/
H A Dtimer.h10 * dm_timer_init - initialize a timer for time keeping. On success
11 * initializes gd->timer so that lib/timer can use it for future
27 * Get the current timer count
29 * @dev: The timer device
30 * @count: pointer that returns the current timer count
36 * Get the timer input clock frequency
38 * @dev: The timer device
39 * @return: the timer input clock frequency
44 * struct timer_ops - Driver model timer operations
46 * The uclass interface is implemented by all timer devices which use
[all …]
/openbmc/qemu/hw/timer/
H A Dcmsdk-apb-timer.c2 * ARM CMSDK APB timer emulation
12 /* This is a model of the "APB timer" which is part of the Cortex-M
18 * by the guest to act either as a 'timer enable' (timer does not run
19 * when EXTIN is low), or as a 'timer clock' (timer runs at frequency
39 #include "hw/timer/cmsdk-apb-timer.h"
86 r = ptimer_get_count(s->timer); in cmsdk_apb_timer_read()
89 r = ptimer_get_limit(s->timer); in cmsdk_apb_timer_read()
99 "CMSDK APB timer read: bad offset %x\n", (int) offset); in cmsdk_apb_timer_read()
121 "CMSDK APB timer: EXTIN input not supported\n"); in cmsdk_apb_timer_write()
124 ptimer_transaction_begin(s->timer); in cmsdk_apb_timer_write()
[all …]
H A Darm_mptimer.c2 * Private peripheral timer/watchdog blocks for ARM 11MPCore and A9MP
27 #include "hw/timer/arm_mptimer.h"
40 /* This device implements the per-cpu private timer and watchdog block
61 /* Return conversion factor from mpcore timer ticks to qemu timer ticks. */
68 static inline void timerblock_set_count(struct ptimer_state *timer, in timerblock_set_count() argument
71 /* PTimer would trigger interrupt for periodic timer when counter set in timerblock_set_count()
75 *count = ptimer_get_limit(timer); in timerblock_set_count()
77 ptimer_set_count(timer, *count); in timerblock_set_count()
81 static inline void timerblock_run(struct ptimer_state *timer, in timerblock_run() argument
85 ptimer_run(timer, !(control & 2)); in timerblock_run()
[all …]
H A Dexynos4210_pwm.c2 * Samsung exynos4210 Pulse Width Modulation Timer
27 #include "qemu/timer.h"
88 /* timer struct */
90 uint32_t id; /* timer id */
91 qemu_irq irq; /* local timer irq */
92 uint32_t freq; /* timer frequency */
94 /* use ptimer.c to represent count down timer */
95 ptimer_state *ptimer; /* timer */
117 Exynos4210PWM timer[EXYNOS4210_PWM_TIMERS_NUM]; member
144 VMSTATE_STRUCT_ARRAY(timer, Exynos4210PWMState,
[all …]
H A Dgrlib_gptimer.c28 #include "hw/timer/grlib_gptimer.h"
30 #include "qemu/timer.h"
95 static void grlib_gptimer_tx_begin(GPTimer *timer) in grlib_gptimer_tx_begin() argument
97 ptimer_transaction_begin(timer->ptimer); in grlib_gptimer_tx_begin()
100 static void grlib_gptimer_tx_commit(GPTimer *timer) in grlib_gptimer_tx_commit() argument
102 ptimer_transaction_commit(timer->ptimer); in grlib_gptimer_tx_commit()
106 static void grlib_gptimer_enable(GPTimer *timer) in grlib_gptimer_enable() argument
108 assert(timer != NULL); in grlib_gptimer_enable()
111 ptimer_stop(timer->ptimer); in grlib_gptimer_enable()
113 if (!(timer->config & GPTIMER_ENABLE)) { in grlib_gptimer_enable()
[all …]
H A Dslavio_timer.c2 * QEMU Sparc SLAVIO timer controller emulation
26 #include "qemu/timer.h"
37 * Registers of hardware timer in sun4m.
39 * This is the timer/counter part of chip STP2001 (Slave I/O), also
46 * Per-CPU timers interrupt local CPU, system timer uses normal
55 ptimer_state *timer; member
116 count = limit - PERIODS_TO_LIMIT(ptimer_get_count(t->timer)); in slavio_timer_get_out()
123 // timer callback
136 /* there is no interrupt if user timer or free-run */ in slavio_timer_irq()
157 // read user timer MSW in slavio_timer_mem_readl()
[all …]
H A Darm_timer.c2 * ARM PrimeCell Timer modules.
13 #include "qemu/timer.h"
21 /* Common timer implementation. */
33 ptimer_state *timer; member
41 /* Check all active timers, and schedule the next timer interrupt. */
62 return ptimer_get_count(s->timer); in arm_timer_read()
79 * Reset the timer limit after settings have changed.
96 ptimer_set_limit(s->timer, limit, reload); in arm_timer_recalibrate()
108 ptimer_transaction_begin(s->timer); in arm_timer_write()
110 ptimer_transaction_commit(s->timer); in arm_timer_write()
[all …]
H A Dsh_timer.c2 * SuperH Timer modules.
16 #include "hw/timer/tmu012.h"
37 ptimer_state *timer; member
50 /* Check all active timers, and schedule the next timer interrupt. */
71 return ptimer_get_count(s->timer); in sh_timer_read()
92 ptimer_transaction_begin(s->timer); in sh_timer_write()
93 ptimer_set_limit(s->timer, s->tcor, 0); in sh_timer_write()
94 ptimer_transaction_commit(s->timer); in sh_timer_write()
98 ptimer_transaction_begin(s->timer); in sh_timer_write()
99 ptimer_set_count(s->timer, s->tcnt); in sh_timer_write()
[all …]
H A Dcmsdk-apb-dualtimer.c2 * ARM CMSDK APB dual-timer emulation
13 * This is a model of the "APB dual-input timer" which is part of the Cortex-M
29 #include "hw/timer/cmsdk-apb-dualtimer.h"
85 /* Return masked interrupt status for the timer module */ in cmsdk_dualtimermod_intstatus()
131 ptimer_transaction_begin(m->timer); in cmsdk_dualtimermod_write_control()
138 /* ENABLE cleared, stop timer before any further changes */ in cmsdk_dualtimermod_write_control()
139 ptimer_stop(m->timer); in cmsdk_dualtimermod_write_control()
158 "CMSDK APB dual-timer: CONTROL.PRESCALE==0b11" in cmsdk_dualtimermod_write_control()
165 ptimer_set_period_from_clock(m->timer, m->parent->timclk, divisor); in cmsdk_dualtimermod_write_control()
175 load = ptimer_get_limit(m->timer); in cmsdk_dualtimermod_write_control()
[all …]
/openbmc/u-boot/arch/arm/cpu/arm920t/ep93xx/
H A Dtimer.c3 * Cirrus Logic EP93xx timer support.
30 } timer; variable
45 if (now >= timer.last_read) in read_timer()
46 timer.ticks += now - timer.last_read; in read_timer()
49 timer.ticks += TIMER_MAX_VAL - timer.last_read + now; in read_timer()
51 timer.last_read = now; in read_timer()
63 sys_ticks = timer.ticks * CONFIG_SYS_HZ; in get_ticks()
80 target = timer.ticks + usecs_to_ticks(usec); in __udelay()
82 while (timer.ticks < target) in __udelay()
90 /* use timer 3 with 508KHz and free running, not enabled now */ in timer_init()
[all …]
/openbmc/sdbusplus/test/timer/
H A Dsuite.hpp3 #include <sdbusplus/timer.hpp>
7 using sdbusplus::Timer;
21 // Add a Timer Object
22 Timer timer; member in TimerTest
25 TimerTest() : rc(sd_event_default(&events)), timer(events) in TimerTest()
28 // event handler and timer object. in TimerTest()
51 // Add a Timer Object
52 std::unique_ptr<Timer> timer = nullptr; member in TimerTestCallBack
67 // event handler and timer object. in TimerTestCallBack()
72 timer = std::make_unique<Timer>(events, func); in TimerTestCallBack()
/openbmc/u-boot/arch/arm/cpu/armv7/sunxi/
H A Dtimer.c10 #include <asm/arch/timer.h>
18 #define TIMER_EN (0x1 << 0) /* enable timer */
28 #define TIMER_NUM 0 /* we use timer 0 */
30 /* read the 32-bit timer */
35 struct sunxi_timer *timer = &timers->timer[TIMER_NUM]; in read_timer() local
38 * The hardware timer counts down, therefore we invert to in read_timer()
39 * produce an incrementing timer. in read_timer()
41 return ~readl(&timer->val); in read_timer()
44 /* init timer register */
49 struct sunxi_timer *timer = &timers->timer[TIMER_NUM]; in timer_init() local
[all …]
/openbmc/qemu/target/riscv/
H A Dtime_helper.c2 * RISC-V timer helper implementation.
40 * Called when timecmp is written to update the QEMU timer or immediately
41 * trigger timer interrupt if mtimecmp <= current timer value.
43 void riscv_timer_write_timecmp(CPURISCVState *env, QEMUTimer *timer, in riscv_timer_write_timecmp() argument
54 /* S/VS Timer IRQ depends on sstc extension, rdtime_fn(), and STCE. */ in riscv_timer_write_timecmp()
60 /* VS Timer IRQ also depends on RVH and henvcfg.STCE. */ in riscv_timer_write_timecmp()
70 * immediately raise the timer interrupt in riscv_timer_write_timecmp()
90 * Sstc specification says the following about timer interrupt: in riscv_timer_write_timecmp()
91 * "A supervisor timer interrupt becomes pending - as reflected in in riscv_timer_write_timecmp()
100 * timecmp value but on next timer tick the time CSR will wrap-around in riscv_timer_write_timecmp()
[all …]
/openbmc/openbmc-test-automation/ipmi/
H A Dtest_ipmi_watchdog.robot21 Test IPMI Watchdog Timer Does Not Log Bit
22 [Documentation] Execute out of band set/get do not log bit for watchdog timer.
32 Test IPMI Watchdog Timer Stop Bit
33 [Documentation] Execute out of band set/get stop/resume timer stop bit for watchdog timer.
43 Test IPMI Watchdog Timer Use Bits
44 [Documentation] Execute out of band set/get timer use bits for watchdog timer.
60 Test IPMI Watchdog Timer Pre-Timeout Interrupt Bits
61 [Documentation] Execute out of band set/get pre-timeout interrupt bits for watchdog timer.
71 Test IPMI Watchdog Timer Timeout Action Bits
72 [Documentation] Execute out of band set/get timer timeout bits for watchdog timer.
[all …]

12345678910>>...67