xref: /openbmc/u-boot/arch/nds32/cpu/n1213/ae3xx/cpu.c (revision 7e86242b)
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  * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
9  *
10  * Copyright (C) 2011 Andes Technology Corporation
11  * Shawn Lin, Andes Technology Corporation <nobuhiro@andestech.com>
12  * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
13  */
14 
15 /* CPU specific code */
16 #include <common.h>
17 #include <command.h>
18 #include <watchdog.h>
19 #include <asm/cache.h>
20 
21 #include <faraday/ftwdt010_wdt.h>
22 
23 /*
24  * cleanup_before_linux() is called just before we call linux
25  * it prepares the processor for linux
26  *
27  * we disable interrupt and caches.
28  */
29 int cleanup_before_linux(void)
30 {
31 	disable_interrupts();
32 
33 	/* turn off I/D-cache */
34 	cache_flush();
35 	icache_disable();
36 	dcache_disable();
37 	return 0;
38 }
39 
40 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
41 {
42 	disable_interrupts();
43 	panic("AE3XX wdt not support yet.\n");
44 }
45