ARM: uniphier: refactor Support Card init code
[oweals/u-boot.git] / arch / arm / mach-uniphier / init / init-pxs2.c
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>
9
10 #include "../init.h"
11 #include "../micro-support-card.h"
12
13 int uniphier_pxs2_init(const struct uniphier_board_data *bd)
14 {
15         int ret;
16
17         uniphier_pxs2_sbc_init();
18
19         support_card_init();
20
21         led_puts("L0");
22
23         uniphier_memconf_3ch_init(bd);
24
25         led_puts("L1");
26
27         uniphier_sld3_early_clk_init();
28         uniphier_pxs2_dram_clk_init();
29
30         led_puts("L2");
31
32         led_puts("L3");
33
34 #ifdef CONFIG_SPL_SERIAL_SUPPORT
35         preloader_console_init();
36 #endif
37
38         led_puts("L4");
39
40         ret = uniphier_pxs2_umc_init(bd);
41         if (ret)
42                 return ret;
43
44         led_puts("L5");
45
46         return 0;
47 }