diff options
author | Mykola Kostenok <c_mykolak@mellanox.com> | 2017-05-24 18:28:20 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2017-06-26 22:20:18 +0930 |
commit | a5e0a21ed4b62ab4d8ff09f70b751db0f46ddaac (patch) | |
tree | 8e47ab4be172afe3c68eb5cc4694a9e97b203f43 /board | |
parent | f8161aba476e554680285c177caceb90bf3d2f2a (diff) | |
download | talos-obmc-uboot-a5e0a21ed4b62ab4d8ff09f70b751db0f46ddaac.tar.gz talos-obmc-uboot-a5e0a21ed4b62ab4d8ff09f70b751db0f46ddaac.zip |
aspeed: Add WD2 reset support for ast-g5
Add support for WATCHDOG_RESET macro for aspeed g5 boards. With this
change we can have the watchdog enabled from boot but also have u-boot
pat the watchdog when dropping to the console.
Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
[joel: tweaked commit message, fixed defines]
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'board')
-rw-r--r-- | board/aspeed/ast-g5/ast-g5.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c index da79d7b79a..e67a4bf8b2 100644 --- a/board/aspeed/ast-g5/ast-g5.c +++ b/board/aspeed/ast-g5/ast-g5.c @@ -46,3 +46,12 @@ int board_eth_init(bd_t *bd) return aspeednic_initialize(bd); } #endif + +/* Called by macro WATCHDOG_RESET */ +#if defined(CONFIG_HW_WATCHDOG) +void hw_watchdog_reset(void) +{ + /* Restart WD2 timer */ + writel(0x4755, AST_WDT2_BASE + 0x08); +} +#endif /* CONFIG_WATCHDOG */ |