Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 2 | /* |
3 | * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. | ||||
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 4 | */ |
5 | |||||
6 | #include <command.h> | ||||
Simon Glass | 9a3b4ce | 2019-12-28 10:45:01 -0700 | [diff] [blame] | 7 | #include <cpu_func.h> |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 8 | |
Harald Seiler | 35b65dd | 2020-12-15 16:47:52 +0100 | [diff] [blame] | 9 | __weak void reset_cpu(void) |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 10 | { |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 11 | /* Stop debug session here */ |
Alexey Brodkin | 8f18714 | 2018-05-30 11:31:07 +0300 | [diff] [blame] | 12 | __builtin_arc_brk(); |
Alexey Brodkin | eb5c853 | 2018-05-30 12:19:54 +0300 | [diff] [blame] | 13 | } |
14 | |||||
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 15 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
Alexey Brodkin | eb5c853 | 2018-05-30 12:19:54 +0300 | [diff] [blame] | 16 | { |
17 | printf("Resetting the board...\n"); | ||||
18 | |||||
Harald Seiler | 35b65dd | 2020-12-15 16:47:52 +0100 | [diff] [blame] | 19 | reset_cpu(); |
Alexey Brodkin | eb5c853 | 2018-05-30 12:19:54 +0300 | [diff] [blame] | 20 | |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 21 | return 0; |
22 | } |