Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 1 | /* |
Masahiro Yamada | 6a3e427 | 2016-09-17 03:33:09 +0900 | [diff] [blame] | 2 | * Copyright (C) 2013-2015 Panasonic Corporation |
3 | * Copyright (C) 2015-2016 Socionext Inc. | ||||
4 | * Author: Masahiro Yamada <yamada.masahiro@socionext.com> | ||||
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 5 | * |
6 | * SPDX-License-Identifier: GPL-2.0+ | ||||
7 | */ | ||||
8 | |||||
9 | #include <common.h> | ||||
10 | #include <spl.h> | ||||
Masahiro Yamada | 107b3fb | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 11 | |
12 | #include "../init.h" | ||||
13 | #include "../micro-support-card.h" | ||||
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 | int uniphier_ld4_init(const struct uniphier_board_data *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_ld4_bcu_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 18 | |
Masahiro Yamada | 9e3bb84 | 2017-01-15 14:59:05 +0900 | [diff] [blame] | 19 | uniphier_ld4_sbc_init(); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 20 | |
Masahiro Yamada | ef07a99 | 2017-01-15 14:59:06 +0900 | [diff] [blame] | 21 | support_card_init(); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 22 | |
Masahiro Yamada | 6a3e427 | 2016-09-17 03:33:09 +0900 | [diff] [blame] | 23 | uniphier_ld4_dpll_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 24 | |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 25 | led_puts("L0"); |
26 | |||||
Masahiro Yamada | 8d6c99c | 2017-01-15 14:59:04 +0900 | [diff] [blame] | 27 | uniphier_memconf_2ch_init(bd); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 28 | |
29 | led_puts("L1"); | ||||
30 | |||||
Masahiro Yamada | 78c627c | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 31 | uniphier_sld3_early_clk_init(); |
32 | uniphier_sld3_dram_clk_init(); | ||||
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 | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 56 | return 0; |
57 | } |