]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/arm/mach-uniphier/init/init-pxs2.c
ARM: uniphier: refactor SBC init code
[people/ms/u-boot.git] / arch / arm / mach-uniphier / init / init-pxs2.c
CommitLineData
019df879
MY
1/*
2 * Copyright (C) 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>
107b3fb4
MY
9
10#include "../init.h"
11#include "../micro-support-card.h"
019df879 12
5b660066 13int uniphier_pxs2_init(const struct uniphier_board_data *bd)
019df879 14{
15607d0d
MY
15 int ret;
16
9e3bb84b 17 uniphier_pxs2_sbc_init();
019df879
MY
18
19 support_card_reset();
20
21 support_card_init();
22
23 led_puts("L0");
24
8d6c99c6 25 uniphier_memconf_3ch_init(bd);
019df879
MY
26
27 led_puts("L1");
28
78c627cf
MY
29 uniphier_sld3_early_clk_init();
30 uniphier_pxs2_dram_clk_init();
019df879
MY
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
5b660066 42 ret = uniphier_pxs2_umc_init(bd);
15607d0d
MY
43 if (ret)
44 return ret;
45
46 led_puts("L5");
47
019df879
MY
48 return 0;
49}