u-boot-brain/drivers/watchdog
Chris Packham 6d8eae9ab7 watchdog: Handle timer wrap around
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@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-03-16 11:25:12 +01:00
..
Kconfig watchdog: Align Kconfig properties 2020-03-13 09:30:30 -04:00
Makefile watchdog: cortina_wdt: add support for HW WDT on CAxxxx SoCs 2020-02-07 16:15:57 -05:00
armada-37xx-wdt.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
ast_wdt.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00
at91sam9_wdt.c watchdog: at91sam9_wdt: Remove now superfluous wdt start and reset 2019-04-26 09:16:32 +02:00
bcm6345_wdt.c watchdog: bcm6345: callback start use tick instead of ms 2019-05-18 12:31:58 -04:00
cdns_wdt.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
cortina_wdt.c watchdog: cortina_wdt: add support for HW WDT on CAxxxx SoCs 2020-02-07 16:15:57 -05:00
designware_wdt.c watchdog: designware: Optionally fetch clock and reset from DT 2020-02-05 03:01:57 +01:00
ftwdt010_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
imx_watchdog.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
mpc8xx_wdt.c watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG 2020-02-28 10:53:55 -05:00
mt7621_wdt.c wdt: Add MT7621 watchdog driver 2018-11-18 16:02:22 +01:00
mtk_wdt.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
omap_wdt.c watchdog: omap_wdt: Fix WDT coding style 2020-02-04 09:07:25 +05:30
orion_wdt.c watchdog: orion_wdt: take timeout value in ms 2019-04-12 07:04:18 +02:00
s5p_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sp805_wdt.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00
stm32mp_wdt.c watchdog: stm32mp: Add watchdog driver 2019-06-06 17:40:16 +02:00
tangier_wdt.c watchdog: tangier: Convert to use WDT class 2019-06-22 22:27:13 +08:00
ulp_wdog.c common: Move reset_cpu() to the CPU header 2020-01-17 14:02:31 -05:00
wdt-uclass.c watchdog: Handle timer wrap around 2020-03-16 11:25:12 +01:00
xilinx_tb_wdt.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00