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