Lines Matching full:watchdog
2 * QTests for Nuvoton NPCM7xx Timer Watchdog Modules.
36 typedef struct Watchdog { struct
39 } Watchdog; typedef
41 static const Watchdog watchdog_list[] = {
56 static int watchdog_index(const Watchdog *wd) in watchdog_index()
65 static uint32_t watchdog_read_wtcr(QTestState *qts, const Watchdog *wd) in watchdog_read_wtcr()
70 static void watchdog_write_wtcr(QTestState *qts, const Watchdog *wd, in watchdog_write_wtcr()
76 static uint32_t watchdog_prescaler(QTestState *qts, const Watchdog *wd) in watchdog_prescaler()
94 QDict *ev = qtest_qmp_eventwait_ref(qts, "WATCHDOG"); in get_watchdog_action()
104 static uint32_t watchdog_interrupt_cycles(QTestState *qts, const Watchdog *wd) in watchdog_interrupt_cycles()
115 static int64_t watchdog_interrupt_steps(QTestState *qts, const Watchdog *wd) in watchdog_interrupt_steps()
122 static void test_init(gconstpointer watchdog) in test_init() argument
124 const Watchdog *wd = watchdog; in test_init()
135 /* Check a watchdog can generate interrupt and reset actions */
136 static void test_reset_action(gconstpointer watchdog) in test_reset_action() argument
138 const Watchdog *wd = watchdog; in test_reset_action()
149 /* Check a watchdog can generate an interrupt */ in test_reset_action()
155 /* Check a watchdog can generate a reset signal */ in test_reset_action()
171 /* Check a watchdog works with all possible WTCLK prescalers and WTIS cycles */
172 static void test_prescaler(gconstpointer watchdog) in test_prescaler() argument
174 const Watchdog *wd = watchdog; in test_prescaler()
201 * Check a watchdog doesn't fire if corresponding flags (WTIE and WTRE) are not
204 static void test_enabling_flags(gconstpointer watchdog) in test_enabling_flags() argument
206 const Watchdog *wd = watchdog; in test_enabling_flags()
257 /* Check a watchdog can pause and resume by setting WTE bits */
258 static void test_pause(gconstpointer watchdog) in test_pause() argument
260 const Watchdog *wd = watchdog; in test_pause()
275 /* Pause the watchdog */ in test_pause()
279 /* Run for a long period of time, the watchdog shouldn't fire */ in test_pause()
284 /* Resume the watchdog */ in test_pause()
288 /* Run for the reset of the execution period, the watchdog should fire */ in test_pause()
297 static void watchdog_add_test(const char *name, const Watchdog* wd, in watchdog_add_test()
312 const Watchdog *wd = &watchdog_list[i]; in main()