SPDX: Convert all of our single license tags to Linux Kernel style
[platform/kernel/u-boot.git] / arch / arc / lib / cpu.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
4  */
5
6 #include <common.h>
7 #include <asm/arcregs.h>
8 #include <asm/cache.h>
9
10 DECLARE_GLOBAL_DATA_PTR;
11
12 int arch_cpu_init(void)
13 {
14         timer_init();
15
16         gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
17         gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
18
19         cache_init();
20
21         return 0;
22 }
23
24 int arch_early_init_r(void)
25 {
26         gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
27         gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
28         return 0;
29 }
30
31 /* This is a dummy function on arc */
32 int dram_init(void)
33 {
34         return 0;
35 }