blob: bbfc8e5e085994cccddd064910268c4527202563 [file] [log] [blame]
Masahiro Yamada323d1f92015-09-22 00:27:39 +09001/*
2 * Copyright (C) 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>
9#include <mach/init.h>
10#include <mach/soc_info.h>
11
12DECLARE_GLOBAL_DATA_PTR;
13
14void spl_board_init(void)
15{
16 const struct uniphier_board_data *param;
17
18 param = uniphier_get_board_param(gd->fdt_blob);
19 if (!param)
20 hang();
21
22 switch (uniphier_get_soc_type()) {
23#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
24 case SOC_UNIPHIER_PH1_SLD3:
25 ph1_sld3_init(param);
26 break;
27#endif
28#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
29 case SOC_UNIPHIER_PH1_LD4:
30 ph1_ld4_init(param);
31 break;
32#endif
33#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
34 case SOC_UNIPHIER_PH1_PRO4:
35 ph1_pro4_init(param);
36 break;
37#endif
38#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
39 case SOC_UNIPHIER_PH1_SLD8:
40 ph1_sld8_init(param);
41 break;
42#endif
Masahiro Yamada28f40d42015-09-22 00:27:40 +090043#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
44 case SOC_UNIPHIER_PH1_PRO5:
45 ph1_pro5_init(param);
46 break;
47#endif
Masahiro Yamada019df872015-09-22 00:27:41 +090048#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
49 defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
50 case SOC_UNIPHIER_PROXSTREAM2:
51 case SOC_UNIPHIER_PH1_LD6B:
52 proxstream2_init(param);
53 break;
54#endif
Masahiro Yamada323d1f92015-09-22 00:27:39 +090055 default:
56 break;
57 }
58}