]> git.ipfire.org Git - people/ms/u-boot.git/blame - 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
CommitLineData
9d0c2ceb 1/*
68557ec3
MY
2 * Copyright (C) 2016 Socionext Inc.
3 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
9d0c2ceb
MY
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
14int uniphier_ld20_init(const struct uniphier_board_data *bd)
15{
9e3bb84b 16 uniphier_ld11_sbc_init();
9d0c2ceb 17
9d0c2ceb
MY
18 support_card_init();
19
20 led_puts("L0");
21
8d6c99c6 22 uniphier_memconf_3ch_init(bd);
9d0c2ceb
MY
23
24 led_puts("L1");
25
78c627cf
MY
26 uniphier_ld11_early_clk_init();
27 uniphier_ld20_dram_clk_init();
9d0c2ceb
MY
28
29 led_puts("L2");
30
9d0c2ceb
MY
31#ifdef CONFIG_SPL_SERIAL_SUPPORT
32 preloader_console_init();
33#endif
34
682e09ff
MY
35 led_puts("L3");
36
37 uniphier_ld20_dpll_init(bd);
38
9d0c2ceb
MY
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
0bd20207
MY
53 dcache_disable();
54
9d0c2ceb
MY
55 return 0;
56}