3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * Author: Igor Lisitsin <igor@emcraft.com>
7 * SPDX-License-Identifier: GPL-2.0+
15 * The test verifies the watchdog timer operation.
16 * On the first iteration, the test routine disables interrupts and
17 * makes a 10-second delay. If the system does not reboot during this delay,
18 * the watchdog timer is not operational and the test fails. If the system
19 * reboots, on the second iteration the test routine reports a success.
24 #if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG
28 int watchdog_post_test (int flags)
30 if (flags & POST_REBOOT) {
36 int ints = disable_interrupts ();
37 ulong base = post_time_ms (0);
39 while (post_time_ms (base) < 10000)
45 * If we have reached this point, the watchdog timer
52 #endif /* CONFIG_POST & CONFIG_SYS_POST_WATCHDOG */