Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 1 | /* |
| 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> |
Masahiro Yamada | 107b3fb | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 9 | |
| 10 | #include "../init.h" |
| 11 | #include "../soc-info.h" |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 12 | |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 13 | void spl_board_init(void) |
| 14 | { |
| 15 | const struct uniphier_board_data *param; |
| 16 | |
Masahiro Yamada | 6ba60fa | 2015-12-17 17:47:42 +0900 | [diff] [blame] | 17 | param = uniphier_get_board_param(); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 18 | if (!param) |
| 19 | hang(); |
| 20 | |
| 21 | switch (uniphier_get_soc_type()) { |
| 22 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3) |
| 23 | case SOC_UNIPHIER_PH1_SLD3: |
| 24 | ph1_sld3_init(param); |
| 25 | break; |
| 26 | #endif |
| 27 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) |
| 28 | case SOC_UNIPHIER_PH1_LD4: |
| 29 | ph1_ld4_init(param); |
| 30 | break; |
| 31 | #endif |
| 32 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) |
| 33 | case SOC_UNIPHIER_PH1_PRO4: |
| 34 | ph1_pro4_init(param); |
| 35 | break; |
| 36 | #endif |
| 37 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8) |
| 38 | case SOC_UNIPHIER_PH1_SLD8: |
| 39 | ph1_sld8_init(param); |
| 40 | break; |
| 41 | #endif |
Masahiro Yamada | 28f40d4 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 42 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5) |
| 43 | case SOC_UNIPHIER_PH1_PRO5: |
| 44 | ph1_pro5_init(param); |
| 45 | break; |
| 46 | #endif |
Masahiro Yamada | 019df87 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 47 | #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \ |
| 48 | defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B) |
| 49 | case SOC_UNIPHIER_PROXSTREAM2: |
| 50 | case SOC_UNIPHIER_PH1_LD6B: |
| 51 | proxstream2_init(param); |
| 52 | break; |
| 53 | #endif |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 54 | default: |
| 55 | break; |
| 56 | } |
| 57 | } |