blob: 2a7ae1b5297d7bc455314cabfdaf5381fb7f0a38 [file] [log] [blame]
Masahiro Yamada1f3d9c72015-02-05 14:42:54 +09001/*
Masahiro Yamada4e5d28d2015-09-22 00:27:31 +09002 * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada1f3d9c72015-02-05 14:42:54 +09003 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
Masahiro Yamadaefdf3402016-01-09 01:51:13 +09007#include "init.h"
8#include "micro-support-card.h"
9#include "soc-info.h"
Masahiro Yamada1f3d9c72015-02-05 14:42:54 +090010
11int board_early_init_f(void)
12{
Masahiro Yamada4e5d28d2015-09-22 00:27:31 +090013 led_puts("U0");
Masahiro Yamada1f3d9c72015-02-05 14:42:54 +090014
Masahiro Yamada75f16f82015-09-22 00:27:39 +090015 switch (uniphier_get_soc_type()) {
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090016#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
17 case SOC_UNIPHIER_SLD3:
Masahiro Yamada98905692016-03-30 20:17:02 +090018 uniphier_sld3_pin_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090019 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090020 uniphier_ld4_clk_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090021 break;
22#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090023#if defined(CONFIG_ARCH_UNIPHIER_LD4)
24 case SOC_UNIPHIER_LD4:
Masahiro Yamada98905692016-03-30 20:17:02 +090025 uniphier_ld4_pin_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090026 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090027 uniphier_ld4_clk_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090028 break;
29#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090030#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
31 case SOC_UNIPHIER_PRO4:
Masahiro Yamada98905692016-03-30 20:17:02 +090032 uniphier_pro4_pin_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090033 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090034 uniphier_pro4_clk_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090035 break;
36#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090037#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
38 case SOC_UNIPHIER_SLD8:
Masahiro Yamada98905692016-03-30 20:17:02 +090039 uniphier_sld8_pin_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090040 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090041 uniphier_ld4_clk_init();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090042 break;
43#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090044#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
45 case SOC_UNIPHIER_PRO5:
Masahiro Yamada98905692016-03-30 20:17:02 +090046 uniphier_pro5_pin_init();
Masahiro Yamadad5167d52015-09-22 00:27:40 +090047 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090048 uniphier_pro5_clk_init();
Masahiro Yamadad5167d52015-09-22 00:27:40 +090049 break;
50#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090051#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
52 case SOC_UNIPHIER_PXS2:
Masahiro Yamada98905692016-03-30 20:17:02 +090053 uniphier_pxs2_pin_init();
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090054 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090055 uniphier_pxs2_clk_init();
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090056 break;
57#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090058#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
59 case SOC_UNIPHIER_LD6B:
Masahiro Yamada98905692016-03-30 20:17:02 +090060 uniphier_ld6b_pin_init();
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090061 led_puts("U1");
Masahiro Yamada98905692016-03-30 20:17:02 +090062 uniphier_pxs2_clk_init();
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090063 break;
64#endif
Masahiro Yamada063eb1e2016-04-21 14:43:18 +090065#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 Yamada75f16f82015-09-22 00:27:39 +090073 default:
74 break;
75 }
Masahiro Yamadac04368f2015-02-27 02:26:51 +090076
Masahiro Yamada4e5d28d2015-09-22 00:27:31 +090077 led_puts("U2");
Masahiro Yamadac04368f2015-02-27 02:26:51 +090078
Masahiro Yamada1f3d9c72015-02-05 14:42:54 +090079 return 0;
80}