blob: b8589d0f0a470b3fd98ca7389712842c31e5834f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Alexey Brodkin3a59d912014-02-04 12:56:14 +04002/*
3 * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
Alexey Brodkin3a59d912014-02-04 12:56:14 +04004 */
5
6#include <command.h>
7#include <common.h>
Simon Glassafb02152019-12-28 10:45:01 -07008#include <cpu_func.h>
Alexey Brodkin3a59d912014-02-04 12:56:14 +04009
Harald Seiler6f14d5f2020-12-15 16:47:52 +010010__weak void reset_cpu(void)
Alexey Brodkin3a59d912014-02-04 12:56:14 +040011{
Alexey Brodkin3a59d912014-02-04 12:56:14 +040012 /* Stop debug session here */
Alexey Brodkin2aef3902018-05-30 11:31:07 +030013 __builtin_arc_brk();
Alexey Brodkin70a66c12018-05-30 12:19:54 +030014}
15
Simon Glassed38aef2020-05-10 11:40:03 -060016int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
Alexey Brodkin70a66c12018-05-30 12:19:54 +030017{
18 printf("Resetting the board...\n");
19
Harald Seiler6f14d5f2020-12-15 16:47:52 +010020 reset_cpu();
Alexey Brodkin70a66c12018-05-30 12:19:54 +030021
Alexey Brodkin3a59d912014-02-04 12:56:14 +040022 return 0;
23}