blob: 7d5c9fd83aee5b2794e24d2100c5dbbb72e2d6e9 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +02002/*
3 * (C) Copyright 2003
4 * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +02005 */
6
7#include <common.h>
8#include <command.h>
Simon Glass691d7192020-05-10 11:40:02 -06009#include <init.h>
Daniel Schwierzeckeef88df2015-01-29 14:56:20 +010010#include <linux/compiler.h>
Paul Burton8cb48172016-09-21 11:18:48 +010011#include <asm/cache.h>
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +020012#include <asm/mipsregs.h>
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +020013#include <asm/reboot.h>
14
Álvaro Fernández Rojas5e365462017-04-25 00:39:15 +020015#ifndef CONFIG_SYSRESET
Daniel Schwierzeckeef88df2015-01-29 14:56:20 +010016void __weak _machine_restart(void)
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +020017{
18 fprintf(stderr, "*** reset failed ***\n");
19
20 while (1)
21 /* NOP */;
22}
23
Simon Glass09140112020-05-10 11:40:03 -060024int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +020025{
26 _machine_restart();
27
28 return 0;
29}
Álvaro Fernández Rojas5e365462017-04-25 00:39:15 +020030#endif
Zhi-zhou Zhang32afad72012-10-16 15:02:08 +020031
Paul Burton8cb48172016-09-21 11:18:48 +010032int arch_cpu_init(void)
33{
34 mips_cache_probe();
35 return 0;
36}