summaryrefslogtreecommitdiff
path: root/arch/arc
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2018-05-30 12:19:54 +0300
committerAlexey Brodkin <abrodkin@synopsys.com>2018-05-31 20:13:29 +0300
commiteb5c853938cb784bbf83ab87847e94764c3cd00a (patch)
tree9f1dc01c7f8618c9ac438eb9b58b622a64462264 /arch/arc
parent8f187142e51634d6887ef397cd6abaa7fab14b21 (diff)
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 <abrodkin@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/lib/reset.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c
index fe38c51bff9..02e08df48de 100644
--- a/arch/arc/lib/reset.c
+++ b/arch/arc/lib/reset.c
@@ -6,13 +6,17 @@
#include <command.h>
#include <common.h>
-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;
}