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> |
| 7 | #include <common.h> |
Simon Glass | 9a3b4ce | 2019-12-28 10:45:01 -0700 | [diff] [blame] | 8 | #include <cpu_func.h> |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 9 | |
Alexey Brodkin | eb5c853 | 2018-05-30 12:19:54 +0300 | [diff] [blame] | 10 | __weak void reset_cpu(ulong addr) |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 11 | { |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 12 | /* Stop debug session here */ |
Alexey Brodkin | 8f18714 | 2018-05-30 11:31:07 +0300 | [diff] [blame] | 13 | __builtin_arc_brk(); |
Alexey Brodkin | eb5c853 | 2018-05-30 12:19:54 +0300 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) |
| 17 | { |
| 18 | printf("Resetting the board...\n"); |
| 19 | |
| 20 | reset_cpu(0); |
| 21 | |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 22 | return 0; |
| 23 | } |