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