[PATCH] watchdog: Handle timer wrap around
sr at denx.de
Mon Mar 16 15:19:11 CET 2020
On 24.02.20 01:20, Chris Packham wrote:
> On some platforms/architectures the value from get_timer() can wrap.
> This is particularly problematic when long-running code needs to measure
> a time difference as is the case with watchdog_reset() which tries to
> avoid tickling the watchdog too frequently.
> Use time_after() from time.h instead of a plain > comparison to avoid
> any issues with the time wrapping on a system that has been sitting in
> u-boot for a long time.
> Signed-off-by: Chris Packham <judge.packham at gmail.com>
Applied to u-boot-marvell/master.
More information about the U-Boot