Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/arcregs.h> |
| 9 | #include <asm/cache.h> |
| 10 | |
| 11 | DECLARE_GLOBAL_DATA_PTR; |
| 12 | |
| 13 | int arch_cpu_init(void) |
| 14 | { |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 15 | timer_init(); |
| 16 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 17 | gd->cpu_clk = CONFIG_SYS_CLK_FREQ; |
| 18 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE; |
| 19 | |
Alexey Brodkin | 9f916ee | 2015-05-18 16:56:26 +0300 | [diff] [blame] | 20 | cache_init(); |
| 21 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | int arch_early_init_r(void) |
| 26 | { |
| 27 | gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; |
| 28 | gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; |
| 29 | return 0; |
| 30 | } |