blob: cb95e06e93118dcd589304796122832d21748be8 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04002/*
3 * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04004 */
5
6#include <common.h>
7#include <asm/arcregs.h>
8#include <asm/cache.h>
9
10DECLARE_GLOBAL_DATA_PTR;
11
12int arch_cpu_init(void)
13{
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040014 timer_init();
15
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040016 gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
17 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
18
Alexey Brodkinef639e62015-05-18 16:56:26 +030019 cache_init();
20
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040021 return 0;
22}
23
24int 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}
Simon Glassf1683aa2017-04-06 12:47:05 -060030
31/* This is a dummy function on arc */
32int dram_init(void)
33{
34 return 0;
35}