Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 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 | { |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 14 | timer_init(); |
| 15 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 16 | gd->cpu_clk = CONFIG_SYS_CLK_FREQ; |
| 17 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE; |
| 18 | |
Alexey Brodkin | 9f916ee | 2015-05-18 16:56:26 +0300 | [diff] [blame] | 19 | cache_init(); |
| 20 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 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 | } |
Simon Glass | d35f338 | 2017-04-06 12:47:05 -0600 | [diff] [blame] | 30 | |
| 31 | /* This is a dummy function on arc */ |
| 32 | int dram_init(void) |
| 33 | { |
| 34 | return 0; |
| 35 | } |