From: Alexey Brodkin Date: Wed, 30 May 2018 09:19:54 +0000 (+0300) Subject: ARC: Reset: Implement weak reset_cpu() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=eb5c853938cb784bbf83ab87847e94764c3cd00a;p=u-boot.git ARC: Reset: Implement weak reset_cpu() This will allow for board-specific implementation of reset. Default version will just stop execution with help of BRK instruction. Signed-off-by: Alexey Brodkin --- diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c index fe38c51bff..02e08df48d 100644 --- a/arch/arc/lib/reset.c +++ b/arch/arc/lib/reset.c @@ -6,13 +6,17 @@ #include #include -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +__weak void reset_cpu(ulong addr) { - printf("Put your restart handler here\n"); - -#ifdef DEBUG /* Stop debug session here */ __builtin_arc_brk(); -#endif +} + +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + printf("Resetting the board...\n"); + + reset_cpu(0); + return 0; }