blob: fa60fa963381cda6ffb301ad1f1a90a4f4044069 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04002/*
3 * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04004 */
5
6#include <command.h>
Simon Glass9a3b4ce2019-12-28 10:45:01 -07007#include <cpu_func.h>
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04008
Harald Seiler35b65dd2020-12-15 16:47:52 +01009__weak void reset_cpu(void)
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040010{
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040011 /* Stop debug session here */
Alexey Brodkin8f187142018-05-30 11:31:07 +030012 __builtin_arc_brk();
Alexey Brodkineb5c8532018-05-30 12:19:54 +030013}
14
Simon Glass09140112020-05-10 11:40:03 -060015int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
Alexey Brodkineb5c8532018-05-30 12:19:54 +030016{
17 printf("Resetting the board...\n");
18
Harald Seiler35b65dd2020-12-15 16:47:52 +010019 reset_cpu();
Alexey Brodkineb5c8532018-05-30 12:19:54 +030020
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040021 return 0;
22}