Masahiro Yamada | 1f3d9c7 | 2015-02-05 14:42:54 +0900 | [diff] [blame] | 1 | /* |
Masahiro Yamada | 4e5d28d | 2015-09-22 00:27:31 +0900 | [diff] [blame] | 2 | * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com> |
Masahiro Yamada | 1f3d9c7 | 2015-02-05 14:42:54 +0900 | [diff] [blame] | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | ||||
5 | */ | ||||
6 | |||||
Masahiro Yamada | efdf340 | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 7 | #include "init.h" |
8 | #include "micro-support-card.h" | ||||
9 | #include "soc-info.h" | ||||
Masahiro Yamada | 1f3d9c7 | 2015-02-05 14:42:54 +0900 | [diff] [blame] | 10 | |
11 | int board_early_init_f(void) | ||||
12 | { | ||||
Masahiro Yamada | 4e5d28d | 2015-09-22 00:27:31 +0900 | [diff] [blame] | 13 | led_puts("U0"); |
Masahiro Yamada | 1f3d9c7 | 2015-02-05 14:42:54 +0900 | [diff] [blame] | 14 | |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 15 | switch (uniphier_get_soc_type()) { |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 16 | #if defined(CONFIG_ARCH_UNIPHIER_SLD3) |
17 | case SOC_UNIPHIER_SLD3: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 18 | uniphier_sld3_pin_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 19 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 20 | uniphier_ld4_clk_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 21 | break; |
22 | #endif | ||||
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 23 | #if defined(CONFIG_ARCH_UNIPHIER_LD4) |
24 | case SOC_UNIPHIER_LD4: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 25 | uniphier_ld4_pin_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 26 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 27 | uniphier_ld4_clk_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 28 | break; |
29 | #endif | ||||
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 30 | #if defined(CONFIG_ARCH_UNIPHIER_PRO4) |
31 | case SOC_UNIPHIER_PRO4: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 32 | uniphier_pro4_pin_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 33 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 34 | uniphier_pro4_clk_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 35 | break; |
36 | #endif | ||||
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 37 | #if defined(CONFIG_ARCH_UNIPHIER_SLD8) |
38 | case SOC_UNIPHIER_SLD8: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 39 | uniphier_sld8_pin_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 40 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 41 | uniphier_ld4_clk_init(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 42 | break; |
43 | #endif | ||||
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 44 | #if defined(CONFIG_ARCH_UNIPHIER_PRO5) |
45 | case SOC_UNIPHIER_PRO5: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 46 | uniphier_pro5_pin_init(); |
Masahiro Yamada | d5167d5 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 47 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 48 | uniphier_pro5_clk_init(); |
Masahiro Yamada | d5167d5 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 49 | break; |
50 | #endif | ||||
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 51 | #if defined(CONFIG_ARCH_UNIPHIER_PXS2) |
52 | case SOC_UNIPHIER_PXS2: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 53 | uniphier_pxs2_pin_init(); |
Masahiro Yamada | 1fe65d3 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 54 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 55 | uniphier_pxs2_clk_init(); |
Masahiro Yamada | 1fe65d3 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 56 | break; |
57 | #endif | ||||
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 58 | #if defined(CONFIG_ARCH_UNIPHIER_LD6B) |
59 | case SOC_UNIPHIER_LD6B: | ||||
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 60 | uniphier_ld6b_pin_init(); |
Masahiro Yamada | 1fe65d3 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 61 | led_puts("U1"); |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 62 | uniphier_pxs2_clk_init(); |
Masahiro Yamada | 1fe65d3 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 63 | break; |
64 | #endif | ||||
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 65 | #if defined(CONFIG_ARCH_UNIPHIER_LD20) |
66 | case SOC_UNIPHIER_LD20: | ||||
67 | uniphier_ld20_pin_init(); | ||||
68 | led_puts("U1"); | ||||
69 | uniphier_ld20_clk_init(); | ||||
70 | cci500_init(2); | ||||
71 | break; | ||||
72 | #endif | ||||
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 73 | default: |
74 | break; | ||||
75 | } | ||||
Masahiro Yamada | c04368f | 2015-02-27 02:26:51 +0900 | [diff] [blame] | 76 | |
Masahiro Yamada | 4e5d28d | 2015-09-22 00:27:31 +0900 | [diff] [blame] | 77 | led_puts("U2"); |
Masahiro Yamada | c04368f | 2015-02-27 02:26:51 +0900 | [diff] [blame] | 78 | |
Masahiro Yamada | 1f3d9c7 | 2015-02-05 14:42:54 +0900 | [diff] [blame] | 79 | return 0; |
80 | } |