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