blob: 77e5b99047bc868347ac93003874cf90552f7c04 [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>
Masahiro Yamadad5cf3292016-03-18 16:41:52 +09008#include <debug_uart.h>
Masahiro Yamada323d1f92015-09-22 00:27:39 +09009#include <spl.h>
Masahiro Yamada107b3fb2016-01-09 01:51:13 +090010
11#include "../init.h"
12#include "../soc-info.h"
Masahiro Yamada323d1f92015-09-22 00:27:39 +090013
Masahiro Yamada323d1f92015-09-22 00:27:39 +090014void spl_board_init(void)
15{
16 const struct uniphier_board_data *param;
17
Masahiro Yamadad5cf3292016-03-18 16:41:52 +090018#ifdef CONFIG_DEBUG_UART
19 debug_uart_init();
20#endif
21
Masahiro Yamada6ba60fa2015-12-17 17:47:42 +090022 param = uniphier_get_board_param();
Masahiro Yamada323d1f92015-09-22 00:27:39 +090023 if (!param)
24 hang();
25
26 switch (uniphier_get_soc_type()) {
Masahiro Yamadaea65c982016-03-18 16:41:43 +090027#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
28 case SOC_UNIPHIER_SLD3:
Masahiro Yamada5b660062016-03-30 20:17:02 +090029 uniphier_sld3_init(param);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090030 break;
31#endif
Masahiro Yamadaea65c982016-03-18 16:41:43 +090032#if defined(CONFIG_ARCH_UNIPHIER_LD4)
33 case SOC_UNIPHIER_LD4:
Masahiro Yamada5b660062016-03-30 20:17:02 +090034 uniphier_ld4_init(param);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090035 break;
36#endif
Masahiro Yamadaea65c982016-03-18 16:41:43 +090037#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
38 case SOC_UNIPHIER_PRO4:
Masahiro Yamada5b660062016-03-30 20:17:02 +090039 uniphier_pro4_init(param);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090040 break;
41#endif
Masahiro Yamadaea65c982016-03-18 16:41:43 +090042#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
43 case SOC_UNIPHIER_SLD8:
Masahiro Yamada5b660062016-03-30 20:17:02 +090044 uniphier_sld8_init(param);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090045 break;
46#endif
Masahiro Yamadaea65c982016-03-18 16:41:43 +090047#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
48 case SOC_UNIPHIER_PRO5:
Masahiro Yamada5b660062016-03-30 20:17:02 +090049 uniphier_pro5_init(param);
Masahiro Yamada28f40d42015-09-22 00:27:40 +090050 break;
51#endif
Masahiro Yamadaea65c982016-03-18 16:41:43 +090052#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
53 case SOC_UNIPHIER_PXS2:
54 case SOC_UNIPHIER_LD6B:
Masahiro Yamada5b660062016-03-30 20:17:02 +090055 uniphier_pxs2_init(param);
Masahiro Yamada019df872015-09-22 00:27:41 +090056 break;
57#endif
Masahiro Yamada667dbcd2016-05-24 21:14:01 +090058#if defined(CONFIG_ARCH_UNIPHIER_LD11)
59 case SOC_UNIPHIER_LD11:
60 uniphier_ld11_init(param);
61 break;
62#endif
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +090063#if defined(CONFIG_ARCH_UNIPHIER_LD20)
64 case SOC_UNIPHIER_LD20:
65 uniphier_ld20_init(param);
66 break;
67#endif
Masahiro Yamada323d1f92015-09-22 00:27:39 +090068 default:
69 break;
70 }
71}