xref: /openbmc/u-boot/arch/sh/cpu/sh4/cpu.c (revision 9e70a116)
1 /*
2  * (C) Copyright 2007
3  * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #include <common.h>
9 #include <command.h>
10 #include <netdev.h>
11 #include <asm/processor.h>
12 #include <asm/cache.h>
13 
14 int checkcpu(void)
15 {
16 	puts("CPU: SH4\n");
17 	return 0;
18 }
19 
20 int cpu_init (void)
21 {
22 	return 0;
23 }
24 
25 int cleanup_before_linux (void)
26 {
27 	disable_interrupts();
28 	return 0;
29 }
30 
31 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
32 {
33 	disable_interrupts();
34 	reset_cpu (0);
35 	return 0;
36 }
37 
38 void flush_cache (unsigned long addr, unsigned long size)
39 {
40 	invalidate_dcache_range(addr , addr + size);
41 }
42 
43 void icache_enable (void)
44 {
45 	cache_control(0);
46 }
47 
48 void icache_disable (void)
49 {
50 	cache_control(1);
51 }
52 
53 int icache_status (void)
54 {
55 	return 0;
56 }
57 
58 void dcache_enable (void)
59 {
60 }
61 
62 void dcache_disable (void)
63 {
64 }
65 
66 int dcache_status (void)
67 {
68 	return 0;
69 }
70 
71 int cpu_eth_init(bd_t *bis)
72 {
73 #ifdef CONFIG_SH_ETHER
74 	sh_eth_initialize(bis);
75 #endif
76 	return 0;
77 }
78