blob: a55adfb58b153e7545b1c259aa5825c6fed852fa [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +09002/*
3 * Copyright (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 * Copyright (C) 2008 Renesas Solutions Corp.
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +09005 */
6
7#include <common.h>
8#include <command.h>
9#include <asm/processor.h>
10#include <asm/io.h>
11
12#define STBCR4 0xFFFE040C
13#define cmt_clock_enable() do {\
14 writeb(readb(STBCR4) & ~0x04, STBCR4);\
15 } while (0)
16#define scif0_enable() do {\
17 writeb(readb(STBCR4) & ~0x80, STBCR4);\
18 } while (0)
Phil Edworthy2b3228d2011-06-01 07:35:13 +010019#define scif3_enable() do {\
20 writeb(readb(STBCR4) & ~0x10, STBCR4);\
21 } while (0)
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +090022
23int checkcpu(void)
24{
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +090025 puts("CPU: SH2\n");
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +090026 return 0;
27}
28
29int cpu_init(void)
30{
31 /* SCIF enable */
Phil Edworthy2b3228d2011-06-01 07:35:13 +010032#if defined(CONFIG_CONS_SCIF3)
33 scif3_enable();
34#else
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +090035 scif0_enable();
Phil Edworthy2b3228d2011-06-01 07:35:13 +010036#endif
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +090037 /* CMT clock enable */
38 cmt_clock_enable() ;
39 return 0;
40}
41
42int cleanup_before_linux(void)
43{
44 disable_interrupts();
45 return 0;
46}
47
Wolfgang Denk6262d0212010-06-28 22:00:46 +020048int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Nobuhiro Iwamatsu5b6918e2008-08-31 22:48:33 +090049{
50 disable_interrupts();
51 reset_cpu(0);
52 return 0;
53}
54
55void flush_cache(unsigned long addr, unsigned long size)
56{
57
58}
59
60void icache_enable(void)
61{
62}
63
64void icache_disable(void)
65{
66}
67
68int icache_status(void)
69{
70 return 0;
71}
72
73void dcache_enable(void)
74{
75}
76
77void dcache_disable(void)
78{
79}
80
81int dcache_status(void)
82{
83 return 0;
84}