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