diff options
author | Wolfgang Denk <wd@denx.de> | 2008-04-25 11:32:01 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-04-25 11:32:01 +0200 |
commit | 4b7a6dd89633d60dc4b58476d5ce48247f82a3ca (patch) | |
tree | d3cfeccec77867d855289809d6a472617d16c0cc /board/lwmon5 | |
parent | 926662762e5d280f6a9caed8dd9f49be2ebcaf2f (diff) | |
parent | a6e6fc610e39dec41b79680413d4ed38145bd3c8 (diff) | |
download | u-boot-imx-4b7a6dd89633d60dc4b58476d5ce48247f82a3ca.zip u-boot-imx-4b7a6dd89633d60dc4b58476d5ce48247f82a3ca.tar.gz u-boot-imx-4b7a6dd89633d60dc4b58476d5ce48247f82a3ca.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/lwmon5
Conflicts:
common/cmd_bootm.c
common/cmd_log.c
include/common.h
post/board/lwmon5/Makefile
post/board/lwmon5/dsp.c
post/board/lwmon5/dspic.c
post/board/lwmon5/fpga.c
post/board/lwmon5/gdc.c
post/board/lwmon5/sysmon.c
post/board/lwmon5/watchdog.c
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/lwmon5')
-rw-r--r-- | board/lwmon5/lwmon5.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c index e5fa259..b63fbdc 100644 --- a/board/lwmon5/lwmon5.c +++ b/board/lwmon5/lwmon5.c @@ -476,6 +476,24 @@ int is_pci_host(struct pci_controller *hose) void hw_watchdog_reset(void) { int val; +#if defined(CONFIG_WD_MAX_RATE) + unsigned long long ct = get_ticks(); + + /* + * Don't allow watch-dog triggering more frequently than + * the predefined value CONFIG_WD_MAX_RATE [ticks]. + */ + if (ct >= gd->wdt_last) { + if ((ct - gd->wdt_last) < CONFIG_WD_MAX_RATE) + return; + } else { + /* Time base counter had been reset */ + if (((unsigned long long)(-1) - gd->wdt_last + ct) < + CONFIG_WD_MAX_RATE) + return; + } + gd->wdt_last = get_ticks(); +#endif /* * Toggle watchdog output |