blob: e8ee0a45ab93cd9f42c48110cc381a90724001ae [file] [log] [blame]
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +09001/*
2 * (C) Copyright 2007
3 * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +09006 */
7
8#include <common.h>
9#include <command.h>
Nobuhiro Iwamatsufe771152009-02-27 18:35:41 +090010#include <netdev.h>
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090011#include <asm/processor.h>
Nobuhiro Iwamatsu65335f82008-03-12 12:15:29 +090012#include <asm/cache.h>
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090013
14int checkcpu(void)
15{
16 puts("CPU: SH4\n");
17 return 0;
18}
19
20int cpu_init (void)
21{
22 return 0;
23}
24
25int cleanup_before_linux (void)
26{
27 disable_interrupts();
28 return 0;
29}
30
Wolfgang Denk6262d0212010-06-28 22:00:46 +020031int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090032{
33 disable_interrupts();
34 reset_cpu (0);
35 return 0;
36}
37
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090038void flush_cache (unsigned long addr, unsigned long size)
39{
Nobuhiro Iwamatsu5b96baf2013-08-22 08:43:47 +090040 invalidate_dcache_range(addr , addr + size);
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090041}
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090042
43void icache_enable (void)
44{
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090045 cache_control(0);
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090046}
47
48void icache_disable (void)
49{
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090050 cache_control(1);
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090051}
52
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090053int icache_status (void)
54{
Wolfgang Denk0a5c2142007-12-27 01:52:50 +010055 return 0;
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090056}
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090057
58void dcache_enable (void)
59{
60}
61
62void dcache_disable (void)
63{
64}
65
66int dcache_status (void)
67{
68 return 0;
69}
Nobuhiro Iwamatsud8f5d502008-11-21 12:04:18 +090070
71int cpu_eth_init(bd_t *bis)
72{
73#ifdef CONFIG_SH_ETHER
74 sh_eth_initialize(bis);
75#endif
76 return 0;
77}