[PATCH] watchdog: Handle timer wrap around
sr at denx.de
Mon Feb 24 12:48:14 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>
Reviewed-by: Stefan Roese <sr at denx.de>
More information about the U-Boot