xref: /openbmc/u-boot/arch/arm/mach-mediatek/cpu.c (revision dd1033e4)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) 2018 MediaTek Inc.
4  */
5 
6 #include <common.h>
7 #include <dm.h>
8 #include <wdt.h>
9 #include <dm/uclass-internal.h>
10 
11 int arch_misc_init(void)
12 {
13 	struct udevice *wdt;
14 	int ret;
15 
16 	ret = uclass_first_device_err(UCLASS_WDT, &wdt);
17 	if (!ret)
18 		wdt_stop(wdt);
19 
20 	return 0;
21 }
22 
23 int arch_cpu_init(void)
24 {
25 	icache_enable();
26 
27 	return 0;
28 }
29 
30 void enable_caches(void)
31 {
32 	/* Enable D-cache. I-cache is already enabled in start.S */
33 	dcache_enable();
34 }
35