Merge branch 'master' of git://git.denx.de/u-boot-uniphier
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / init / init-ld20.c
1 /*
2  * Copyright (C) 2016 Socionext Inc.
3  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #include <common.h>
9 #include <spl.h>
10
11 #include "../init.h"
12 #include "../micro-support-card.h"
13
14 int uniphier_ld20_init(const struct uniphier_board_data *bd)
15 {
16         uniphier_sbc_init_savepin(bd);
17         uniphier_pxs2_sbc_init(bd);
18         uniphier_pin_init("system_bus_grp");
19
20         support_card_reset();
21
22         support_card_init();
23
24         led_puts("L0");
25
26         memconf_init(bd);
27         uniphier_pxs2_memconf_init(bd);
28
29         led_puts("L1");
30
31         uniphier_ld20_early_clk_init(bd);
32
33         led_puts("L2");
34
35 #ifdef CONFIG_SPL_SERIAL_SUPPORT
36         preloader_console_init();
37 #endif
38
39         led_puts("L3");
40
41         uniphier_ld20_dpll_init(bd);
42
43         led_puts("L4");
44
45         {
46                 int res;
47
48                 res = uniphier_ld20_umc_init(bd);
49                 if (res < 0) {
50                         while (1)
51                                 ;
52                 }
53         }
54
55         led_puts("L5");
56
57         dcache_disable();
58
59         return 0;
60 }