]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-uniphier/init/init-sld8.c
ARM: uniphier: refactor board_init()
[people/ms/u-boot.git] / arch / arm / mach-uniphier / init / init-sld8.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_sld8_init(const struct uniphier_board_data *bd)
16 {
17 uniphier_ld4_bcu_init(bd);
18
19 uniphier_ld4_sbc_init();
20
21 support_card_init();
22
23 uniphier_sld8_dpll_init(bd);
24
25 led_puts("L0");
26
27 uniphier_memconf_2ch_init(bd);
28
29 led_puts("L1");
30
31 uniphier_sld3_early_clk_init();
32 uniphier_sld3_dram_clk_init();
33
34 led_puts("L2");
35
36 led_puts("L3");
37
38 #ifdef CONFIG_SPL_SERIAL_SUPPORT
39 preloader_console_init();
40 #endif
41
42 led_puts("L4");
43
44 {
45 int res;
46
47 res = uniphier_sld8_umc_init(bd);
48 if (res < 0) {
49 while (1)
50 ;
51 }
52 }
53
54 led_puts("L5");
55
56 return 0;
57 }