2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2012-10-16 13:02:08 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2003
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <command.h>
|
2020-05-10 17:40:02 +00:00
|
|
|
#include <init.h>
|
2015-01-29 13:56:20 +00:00
|
|
|
#include <linux/compiler.h>
|
2016-09-21 10:18:48 +00:00
|
|
|
#include <asm/cache.h>
|
2012-10-16 13:02:08 +00:00
|
|
|
#include <asm/mipsregs.h>
|
|
|
|
#include <asm/reboot.h>
|
|
|
|
|
2020-11-12 08:35:38 +00:00
|
|
|
#if !CONFIG_IS_ENABLED(SYSRESET)
|
2015-01-29 13:56:20 +00:00
|
|
|
void __weak _machine_restart(void)
|
2012-10-16 13:02:08 +00:00
|
|
|
{
|
2023-06-23 18:49:21 +00:00
|
|
|
puts("*** reset failed ***\n");
|
2012-10-16 13:02:08 +00:00
|
|
|
|
|
|
|
while (1)
|
|
|
|
/* NOP */;
|
|
|
|
}
|
|
|
|
|
2020-05-10 17:40:03 +00:00
|
|
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
2012-10-16 13:02:08 +00:00
|
|
|
{
|
|
|
|
_machine_restart();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2017-04-24 22:39:15 +00:00
|
|
|
#endif
|
2012-10-16 13:02:08 +00:00
|
|
|
|
2016-09-21 10:18:48 +00:00
|
|
|
int arch_cpu_init(void)
|
|
|
|
{
|
|
|
|
mips_cache_probe();
|
|
|
|
return 0;
|
|
|
|
}
|