mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-30 08:07:59 +00:00
mips: Add a reset_cpu() function
The current do_reset() is called from a command context. Add a function which can be used from anywhere, as is done on ARM. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a213289953
commit
4f4490a79e
1 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
* Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
|
* Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cpu_func.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
|
@ -20,9 +21,14 @@ void __weak _machine_restart(void)
|
||||||
/* NOP */;
|
/* NOP */;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
void reset_cpu(void)
|
||||||
{
|
{
|
||||||
_machine_restart();
|
_machine_restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
|
{
|
||||||
|
reset_cpu();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue