diff options
Diffstat (limited to 'lib_microblaze/board.c')
-rw-r--r-- | lib_microblaze/board.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c index 3e3fb3762ca..b720e82039a 100644 --- a/lib_microblaze/board.c +++ b/lib_microblaze/board.c @@ -26,6 +26,7 @@ #include <command.h> #include <malloc.h> #include <version.h> +#include <watchdog.h> const char version_string[] = U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")"; @@ -69,6 +70,24 @@ init_fnc_t *init_sequence[] = { NULL, }; +void board_init(void) +{ + init_fnc_t **init_fnc_ptr; + + for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { + WATCHDOG_RESET (); + if ((*init_fnc_ptr) () != 0) { + hang (); + } + } + + /* main_loop */ + for (;;) { + WATCHDOG_RESET (); + main_loop (); + } +} + void hang (void) { puts ("### ERROR ### Please RESET the board ###\n"); |