1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2003
4  * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
5  */
6 
7 #include <cpu_func.h>
8 #include <command.h>
9 #include <init.h>
10 #include <linux/compiler.h>
11 #include <asm/cache.h>
12 #include <asm/mipsregs.h>
13 #include <asm/reboot.h>
14 
15 #if !CONFIG_IS_ENABLED(SYSRESET)
_machine_restart(void)16 void __weak _machine_restart(void)
17 {
18 	puts("*** reset failed ***\n");
19 
20 	while (1)
21 		/* NOP */;
22 }
23 
reset_cpu(void)24 void reset_cpu(void)
25 {
26 	_machine_restart();
27 }
28 
do_reset(struct cmd_tbl * cmdtp,int flag,int argc,char * const argv[])29 int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
30 {
31 	reset_cpu();
32 
33 	return 0;
34 }
35 #endif
36 
arch_cpu_init(void)37 int arch_cpu_init(void)
38 {
39 	mips_cache_probe();
40 	return 0;
41 }
42