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> |
| 9 | #include <mach/init.h> |
| 10 | #include <mach/soc_info.h> |
| 11 | |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 12 | void spl_board_init(void) |
| 13 | { |
| 14 | const struct uniphier_board_data *param; |
| 15 | |
Masahiro Yamada | 6ba60fa | 2015-12-17 17:47:42 +0900 | [diff] [blame^] | 16 | param = uniphier_get_board_param(); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 17 | 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 Yamada | 28f40d4 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 41 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5) |
| 42 | case SOC_UNIPHIER_PH1_PRO5: |
| 43 | ph1_pro5_init(param); |
| 44 | break; |
| 45 | #endif |
Masahiro Yamada | 019df87 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 46 | #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 Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 53 | default: |
| 54 | break; |
| 55 | } |
| 56 | } |