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