]> git.baikalelectronics.ru Git - uboot.git/commit
dm: rtc: Avoid a race in the rtc_reset test
authorSimon Glass <sjg@chromium.org>
Mon, 1 Aug 2022 13:58:46 +0000 (07:58 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 2 Sep 2022 20:21:44 +0000 (16:21 -0400)
commit1fd32570a3cf5cece7e40ed2bd164782cc3510e3
tree39c5bc98b3a4dfbd36e0f0fb0e935d0d91c9c7b2
parenta0022f3a06f896dbc4445fce9a5daa0118c0821f
dm: rtc: Avoid a race in the rtc_reset test

Since resetting the RTC on sandbox causes it to read the base time from
the system, we cannot rely on this being unchanged since it was last read.
Allow for a one-second delay.

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/4
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Reported-by: Tom Rini <trini@konsulko.com>
Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Simon Glass <sjg@chromium.org>
test/dm/rtc.c