diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2018-11-21 08:51:47 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-03 10:44:10 -0500 |
commit | 4c4ca6cdd5836a416fcebe0d8dea585ad4a00681 (patch) | |
tree | c76920df9b7e2301788ef3b419dd23294379fafb /board/cssi/MCR3000/MCR3000.c | |
parent | 749c9aae9d59c5f15832b51a75f8959c25316ab1 (diff) |
board: MCR3000: use new DM watchdog
This patch switches MCR3000 board to the new DM watchdog.
The change in u-boot.lds is because MCR3000.o grows a bit
with this patch and doesn't fit anymore below env_offset on
some versions of GCC.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Diffstat (limited to 'board/cssi/MCR3000/MCR3000.c')
-rw-r--r-- | board/cssi/MCR3000/MCR3000.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index ffbeb14ed0..d26ac35b44 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -12,6 +12,8 @@ #include <mpc8xx.h> #include <fdt_support.h> #include <asm/io.h> +#include <dm/uclass.h> +#include <wdt.h> DECLARE_GLOBAL_DATA_PTR; @@ -143,3 +145,17 @@ int board_early_init_f(void) return 0; } + +int board_early_init_r(void) +{ + struct udevice *watchdog_dev = NULL; + + if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) { + puts("Cannot find watchdog!\n"); + } else { + puts("Enabling watchdog.\n"); + wdt_start(watchdog_dev, 0xffff, 0); + } + + return 0; +} |