mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
Some problems with reading the RTC time may happen rarely, for example
while the RTC is updating. So read the RTC many times to catch these
problems. For example, a previous attempt for my
commit ea6fa4961a ("rtc: mc146818-lib: fix RTC presence check")
was incorrect and would have triggered this selftest.
To avoid the risk of damaging the hardware, wait 11ms before consecutive
reads.
In rtc_time_to_timestamp I copied values manually instead of casting -
just to be on the safe side. The 11ms wait period was chosen so that it is
not a divisor of 1000ms.
Signed-off-by: Mateusz Jończyk <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
2 lines
12 B
Plaintext
2 lines
12 B
Plaintext
timeout=210
|