Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 1 | /* |
2 | * Copyright (C) 2013-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> | ||||
Masahiro Yamada | 107b3fb | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 9 | |
10 | #include "../init.h" | ||||
11 | #include "../micro-support-card.h" | ||||
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 12 | |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 13 | int uniphier_ld4_init(const struct uniphier_board_data *bd) |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 14 | { |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 15 | uniphier_ld4_bcu_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 16 | |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 17 | uniphier_sbc_init_savepin(bd); |
Masahiro Yamada | 5d0607c | 2016-03-18 16:41:44 +0900 | [diff] [blame] | 18 | uniphier_ld4_sbc_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 19 | |
20 | support_card_reset(); | ||||
21 | |||||
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 22 | uniphier_ld4_pll_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 23 | |
24 | support_card_init(); | ||||
25 | |||||
26 | led_puts("L0"); | ||||
27 | |||||
28 | memconf_init(bd); | ||||
29 | |||||
30 | led_puts("L1"); | ||||
31 | |||||
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 32 | uniphier_ld4_early_clk_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 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 | |||||
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 47 | res = uniphier_ld4_umc_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 48 | if (res < 0) { |
49 | while (1) | ||||
50 | ; | ||||
51 | } | ||||
52 | } | ||||
53 | |||||
54 | led_puts("L5"); | ||||
55 | |||||
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 56 | uniphier_ld4_enable_dpll_ssc(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 57 | |
58 | led_puts("L6"); | ||||
59 | |||||
60 | return 0; | ||||
61 | } |