From: Alexey Brodkin Date: Thu, 31 May 2018 19:27:38 +0300 Subject: [U-Boot] [PATCH] ARC: Reset: Implement weak reset_cpu() Message-ID: <20180531162738.7963-1-abrodkin@synopsys.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/arc/lib/reset.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c index fe38c51bff93..02e08df48de0 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; } -- 2.17.0