ARM: uniphier: allow to enable multiple SoCs
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / board_early_init_f.c
1 /*
2  * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <mach/init.h>
8 #include <mach/micro-support-card.h>
9 #include <mach/soc_info.h>
10
11 int board_early_init_f(void)
12 {
13         led_puts("U0");
14
15         switch (uniphier_get_soc_type()) {
16 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
17         case SOC_UNIPHIER_PH1_SLD3:
18                 ph1_sld3_pin_init();
19                 led_puts("U1");
20                 ph1_ld4_clk_init();
21                 break;
22 #endif
23 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
24         case SOC_UNIPHIER_PH1_LD4:
25                 ph1_ld4_pin_init();
26                 led_puts("U1");
27                 ph1_ld4_clk_init();
28                 break;
29 #endif
30 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
31         case SOC_UNIPHIER_PH1_PRO4:
32                 ph1_pro4_pin_init();
33                 led_puts("U1");
34                 ph1_pro4_clk_init();
35                 break;
36 #endif
37 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
38         case SOC_UNIPHIER_PH1_SLD8:
39                 ph1_sld8_pin_init();
40                 led_puts("U1");
41                 ph1_ld4_clk_init();
42                 break;
43 #endif
44         default:
45                 break;
46         }
47
48         led_puts("U2");
49
50         return 0;
51 }