blob: eda169e3740c4f1fb97ff8fecb8ca5242c6052eb [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
Masahiro Yamada323d1f92015-09-22 00:27:39 +090012void spl_board_init(void)
13{
14 const struct uniphier_board_data *param;
15
Masahiro Yamada6ba60fa2015-12-17 17:47:42 +090016 param = uniphier_get_board_param();
Masahiro Yamada323d1f92015-09-22 00:27:39 +090017 if (!param)
18 hang();
19
20 switch (uniphier_get_soc_type()) {
21#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
22 case SOC_UNIPHIER_PH1_SLD3:
23 ph1_sld3_init(param);
24 break;
25#endif
26#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
27 case SOC_UNIPHIER_PH1_LD4:
28 ph1_ld4_init(param);
29 break;
30#endif
31#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
32 case SOC_UNIPHIER_PH1_PRO4:
33 ph1_pro4_init(param);
34 break;
35#endif
36#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
37 case SOC_UNIPHIER_PH1_SLD8:
38 ph1_sld8_init(param);
39 break;
40#endif
Masahiro Yamada28f40d42015-09-22 00:27:40 +090041#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
42 case SOC_UNIPHIER_PH1_PRO5:
43 ph1_pro5_init(param);
44 break;
45#endif
Masahiro Yamada019df872015-09-22 00:27:41 +090046#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
47 defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
48 case SOC_UNIPHIER_PROXSTREAM2:
49 case SOC_UNIPHIER_PH1_LD6B:
50 proxstream2_init(param);
51 break;
52#endif
Masahiro Yamada323d1f92015-09-22 00:27:39 +090053 default:
54 break;
55 }
56}