2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2009-04-05 11:08:03 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2002
|
|
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
|
|
*
|
|
|
|
* (C) Copyright 2002
|
|
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
|
|
* Alex Zuepke <azu@sysgo.de>
|
|
|
|
*
|
|
|
|
* (C) Copyright 2002
|
2009-05-13 08:54:10 +00:00
|
|
|
* Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
|
2009-04-05 11:08:03 +00:00
|
|
|
*
|
|
|
|
* (C) Copyright 2004
|
|
|
|
* DAVE Srl
|
|
|
|
* http://www.dave-tech.it
|
|
|
|
* http://www.wawnet.biz
|
|
|
|
* mailto:info@wawnet.biz
|
|
|
|
*
|
|
|
|
* (C) Copyright 2004 Texas Insturments
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2020-05-10 17:40:03 +00:00
|
|
|
#include <command.h>
|
2019-12-28 17:45:01 +00:00
|
|
|
#include <cpu_func.h>
|
2019-11-14 19:57:42 +00:00
|
|
|
#include <irq_func.h>
|
2020-05-10 17:40:11 +00:00
|
|
|
#include <linux/delay.h>
|
2023-03-15 00:24:26 +00:00
|
|
|
#include <stdio.h>
|
2009-04-05 11:08:03 +00:00
|
|
|
|
2014-09-01 11:50:48 +00:00
|
|
|
__weak void reset_misc(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-05-10 17:40:03 +00:00
|
|
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
2009-04-05 11:08:03 +00:00
|
|
|
{
|
|
|
|
puts ("resetting ...\n");
|
2023-03-15 00:24:26 +00:00
|
|
|
flush();
|
2009-04-05 11:08:03 +00:00
|
|
|
|
|
|
|
disable_interrupts();
|
2014-09-01 11:50:48 +00:00
|
|
|
|
|
|
|
reset_misc();
|
2020-12-15 15:47:52 +00:00
|
|
|
reset_cpu();
|
2009-04-05 11:08:03 +00:00
|
|
|
|
|
|
|
/*NOTREACHED*/
|
|
|
|
return 0;
|
|
|
|
}
|