]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-uniphier/init/init-ld20.c
ARM: uniphier: refactor Support Card init code
[people/ms/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_ld11_sbc_init();
17
18 support_card_init();
19
20 led_puts("L0");
21
22 uniphier_memconf_3ch_init(bd);
23
24 led_puts("L1");
25
26 uniphier_ld11_early_clk_init();
27 uniphier_ld20_dram_clk_init();
28
29 led_puts("L2");
30
31 #ifdef CONFIG_SPL_SERIAL_SUPPORT
32 preloader_console_init();
33 #endif
34
35 led_puts("L3");
36
37 uniphier_ld20_dpll_init(bd);
38
39 led_puts("L4");
40
41 {
42 int res;
43
44 res = uniphier_ld20_umc_init(bd);
45 if (res < 0) {
46 while (1)
47 ;
48 }
49 }
50
51 led_puts("L5");
52
53 dcache_disable();
54
55 return 0;
56 }