Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 1 | /* |
2 | * (C) Copyright 2007 | ||||
3 | * Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||||
4 | * | ||||
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 6 | */ |
7 | |||||
8 | #include <common.h> | ||||
9 | #include <command.h> | ||||
Nobuhiro Iwamatsu | fe77115 | 2009-02-27 18:35:41 +0900 | [diff] [blame] | 10 | #include <netdev.h> |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 11 | #include <asm/processor.h> |
Nobuhiro Iwamatsu | 65335f8 | 2008-03-12 12:15:29 +0900 | [diff] [blame] | 12 | #include <asm/cache.h> |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 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 | |||||
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 31 | int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 32 | { |
33 | disable_interrupts(); | ||||
34 | reset_cpu (0); | ||||
35 | return 0; | ||||
36 | } | ||||
37 | |||||
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 38 | void flush_cache (unsigned long addr, unsigned long size) |
39 | { | ||||
Nobuhiro Iwamatsu | 5b96baf | 2013-08-22 08:43:47 +0900 | [diff] [blame] | 40 | invalidate_dcache_range(addr , addr + size); |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 41 | } |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 42 | |
43 | void icache_enable (void) | ||||
44 | { | ||||
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 45 | cache_control(0); |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 46 | } |
47 | |||||
48 | void icache_disable (void) | ||||
49 | { | ||||
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 50 | cache_control(1); |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 51 | } |
52 | |||||
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 53 | int icache_status (void) |
54 | { | ||||
Wolfgang Denk | 0a5c214 | 2007-12-27 01:52:50 +0100 | [diff] [blame] | 55 | return 0; |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 56 | } |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 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 | } | ||||
Nobuhiro Iwamatsu | d8f5d50 | 2008-11-21 12:04:18 +0900 | [diff] [blame] | 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 | } |