]> git.sur5r.net Git - u-boot/commitdiff
ARC: Reset: Implement weak reset_cpu()
authorAlexey Brodkin <abrodkin@synopsys.com>
Wed, 30 May 2018 09:19:54 +0000 (12:19 +0300)
committerAlexey Brodkin <abrodkin@synopsys.com>
Thu, 31 May 2018 17:13:29 +0000 (20:13 +0300)
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>
arch/arc/lib/reset.c

index fe38c51bff9395dfc0023d9c446b3c8b94a1dd47..02e08df48de08234a7e751086ffd4da595220136 100644 (file)
@@ -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;
 }