ARM: uniphier: split out UMC clock enable
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / init / init-ld4.c
1 /*
2  * Copyright (C) 2013-2015 Panasonic Corporation
3  * Copyright (C) 2015-2016 Socionext Inc.
4  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #include <common.h>
10 #include <spl.h>
11
12 #include "../init.h"
13 #include "../micro-support-card.h"
14
15 int uniphier_ld4_init(const struct uniphier_board_data *bd)
16 {
17         uniphier_ld4_bcu_init(bd);
18
19         uniphier_sbc_init_savepin(bd);
20         uniphier_ld4_sbc_init(bd);
21
22         support_card_reset();
23
24         uniphier_ld4_dpll_init(bd);
25
26         support_card_init();
27
28         led_puts("L0");
29
30         memconf_init(bd);
31
32         led_puts("L1");
33
34         uniphier_sld3_early_clk_init();
35         uniphier_sld3_dram_clk_init();
36
37         led_puts("L2");
38
39         led_puts("L3");
40
41 #ifdef CONFIG_SPL_SERIAL_SUPPORT
42         preloader_console_init();
43 #endif
44
45         led_puts("L4");
46
47         {
48                 int res;
49
50                 res = uniphier_ld4_umc_init(bd);
51                 if (res < 0) {
52                         while (1)
53                                 ;
54                 }
55         }
56
57         led_puts("L5");
58
59         return 0;
60 }