diff options
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 @@ | |||
12 | #include <mpc8xx.h> | 12 | #include <mpc8xx.h> |
13 | #include <fdt_support.h> | 13 | #include <fdt_support.h> |
14 | #include <asm/io.h> | 14 | #include <asm/io.h> |
15 | #include <dm/uclass.h> | ||
16 | #include <wdt.h> | ||
15 | 17 | ||
16 | DECLARE_GLOBAL_DATA_PTR; | 18 | DECLARE_GLOBAL_DATA_PTR; |
17 | 19 | ||
@@ -143,3 +145,17 @@ int board_early_init_f(void) | |||
143 | 145 | ||
144 | return 0; | 146 | return 0; |
145 | } | 147 | } |
148 | |||
149 | int board_early_init_r(void) | ||
150 | { | ||
151 | struct udevice *watchdog_dev = NULL; | ||
152 | |||
153 | if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) { | ||
154 | puts("Cannot find watchdog!\n"); | ||
155 | } else { | ||
156 | puts("Enabling watchdog.\n"); | ||
157 | wdt_start(watchdog_dev, 0xffff, 0); | ||
158 | } | ||
159 | |||
160 | return 0; | ||
161 | } | ||