Prepare v2023.10
[platform/kernel/u-boot.git] / arch / arm / lib / reset.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2002
4  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
5  * Marius Groeger <mgroeger@sysgo.de>
6  *
7  * (C) Copyright 2002
8  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9  * Alex Zuepke <azu@sysgo.de>
10  *
11  * (C) Copyright 2002
12  * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
13  *
14  * (C) Copyright 2004
15  * DAVE Srl
16  * http://www.dave-tech.it
17  * http://www.wawnet.biz
18  * mailto:info@wawnet.biz
19  *
20  * (C) Copyright 2004 Texas Insturments
21  */
22
23 #include <common.h>
24 #include <command.h>
25 #include <cpu_func.h>
26 #include <irq_func.h>
27 #include <linux/delay.h>
28 #include <stdio.h>
29
30 __weak void reset_misc(void)
31 {
32 }
33
34 int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
35 {
36         puts ("resetting ...\n");
37         flush();
38
39         disable_interrupts();
40
41         reset_misc();
42         reset_cpu();
43
44         /*NOTREACHED*/
45         return 0;
46 }