diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-27 07:32:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-27 07:32:09 -0400 |
commit | 3b589d70cdd0147fb5b5c865a31d63b8f0cd685d (patch) | |
tree | 0f55783252d3a4a408cdd3b2e2854ae6ae3702ae /drivers/timer | |
parent | ff8cb34d79384524ed81027f7d07a31f7405c27d (diff) | |
parent | 729c1fe656913f0d5b09e986fec9976020a3363c (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- WDT: Enable use of hw_margin_ms=0
- PowerPC: Introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD
- PowerPC: Misc changes and fixes to the WDT handling
Diffstat (limited to 'drivers/timer')
-rw-r--r-- | drivers/timer/mpc83xx_timer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index f4f6e90387..952293195f 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -20,6 +20,10 @@ DECLARE_GLOBAL_DATA_PTR; +#ifndef CONFIG_SYS_WATCHDOG_FREQ +#define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) +#endif + /** * struct mpc83xx_timer_priv - Private data structure for MPC83xx timer driver * @decrementer_count: Value to which the decrementer register should be re-set @@ -171,7 +175,7 @@ void timer_interrupt(struct pt_regs *regs) priv->timestamp++; #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) - if ((timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) + if (CONFIG_SYS_WATCHDOG_FREQ && (priv->timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) WATCHDOG_RESET(); #endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ |