Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 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 |
Detlev Zundel | f1b3f2b | 2009-05-13 10:54:10 +0200 | [diff] [blame] | 12 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 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 |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 21 | */ |
| 22 | |
| 23 | #include <common.h> |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 24 | #include <command.h> |
Simon Glass | afb0215 | 2019-12-28 10:45:01 -0700 | [diff] [blame] | 25 | #include <cpu_func.h> |
Simon Glass | 8f3f761 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 26 | #include <irq_func.h> |
Simon Glass | dbd7954 | 2020-05-10 11:40:11 -0600 | [diff] [blame] | 27 | #include <linux/delay.h> |
Tony Dinh | 88d0f5b | 2023-03-14 17:24:26 -0700 | [diff] [blame] | 28 | #include <stdio.h> |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 29 | |
Przemyslaw Marczak | ec1c122 | 2014-09-01 13:50:48 +0200 | [diff] [blame] | 30 | __weak void reset_misc(void) |
| 31 | { |
| 32 | } |
| 33 | |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 34 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 35 | { |
| 36 | puts ("resetting ...\n"); |
Tony Dinh | 88d0f5b | 2023-03-14 17:24:26 -0700 | [diff] [blame] | 37 | flush(); |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 38 | |
| 39 | disable_interrupts(); |
Przemyslaw Marczak | ec1c122 | 2014-09-01 13:50:48 +0200 | [diff] [blame] | 40 | |
| 41 | reset_misc(); |
Harald Seiler | 6f14d5f | 2020-12-15 16:47:52 +0100 | [diff] [blame] | 42 | reset_cpu(); |
Jean-Christophe PLAGNIOL-VILLARD | 189b87a | 2009-04-05 13:08:03 +0200 | [diff] [blame] | 43 | |
| 44 | /*NOTREACHED*/ |
| 45 | return 0; |
| 46 | } |