blob: c3efa31f594df4609e17345f45fcf226935acbb1 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
rickf1113c92017-05-18 14:37:53 +08002/*
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>
rickf1113c92017-05-18 14:37:53 +080013 */
14
15/* CPU specific code */
16#include <common.h>
17#include <command.h>
Simon Glass1d91ba72019-11-14 12:57:37 -070018#include <cpu_func.h>
Simon Glass63334482019-11-14 12:57:39 -070019#include <irq_func.h>
rickf1113c92017-05-18 14:37:53 +080020#include <watchdog.h>
21#include <asm/cache.h>
22
23#include <faraday/ftwdt010_wdt.h>
24
25/*
26 * cleanup_before_linux() is called just before we call linux
27 * it prepares the processor for linux
28 *
29 * we disable interrupt and caches.
30 */
31int cleanup_before_linux(void)
32{
33 disable_interrupts();
34
35 /* turn off I/D-cache */
36 cache_flush();
37 icache_disable();
38 dcache_disable();
39 return 0;
40}
41
Simon Glassed38aef2020-05-10 11:40:03 -060042int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
rickf1113c92017-05-18 14:37:53 +080043{
44 disable_interrupts();
45 panic("AE3XX wdt not support yet.\n");
46}