ARM: uniphier: allow to enable multiple SoCs
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / init / init-ph1-pro4.c
1 /*
2  * Copyright (C) 2013-2015 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 #include <linux/compiler.h>
10 #include <mach/init.h>
11 #include <mach/micro-support-card.h>
12
13 int ph1_pro4_init(const struct uniphier_board_data *bd)
14 {
15         ph1_pro4_sbc_init(bd);
16
17         support_card_reset();
18
19         ph1_pro4_pll_init(bd);
20
21         support_card_init();
22
23         led_puts("L0");
24
25         memconf_init(bd);
26
27         led_puts("L1");
28
29         ph1_ld4_early_clk_init(bd);
30
31         led_puts("L2");
32
33         led_puts("L3");
34
35 #ifdef CONFIG_SPL_SERIAL_SUPPORT
36         preloader_console_init();
37 #endif
38
39         led_puts("L4");
40
41         {
42                 int res;
43
44                 res = ph1_pro4_umc_init(bd);
45                 if (res < 0) {
46                         while (1)
47                                 ;
48                 }
49         }
50
51         led_puts("L5");
52
53         ph1_ld4_enable_dpll_ssc(bd);
54
55         led_puts("L6");
56
57         return 0;
58 }