]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/uniphier/dram_init.c
Merge branch 'u-boot-marvell/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / uniphier / dram_init.c
1 /*
2  * Copyright (C) 2012-2014 Panasonic Corporation
3  *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #include <common.h>
9 #include <asm/arch/led.h>
10
11 int umc_init(void);
12 void enable_dpll_ssc(void);
13
14 int dram_init(void)
15 {
16         DECLARE_GLOBAL_DATA_PTR;
17         gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
18
19 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
20         led_write(B, 4, , );
21
22         {
23                 int res;
24
25                 res = umc_init();
26                 if (res < 0)
27                         return res;
28         }
29         led_write(B, 5, , );
30
31         enable_dpll_ssc();
32 #endif
33
34         led_write(B, 6, , );
35
36         return 0;
37 }