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 | |
| 12 | DECLARE_GLOBAL_DATA_PTR; |
| 13 | |
| 14 | void 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 Yamada | 28f40d4 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 43 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5) |
| 44 | case SOC_UNIPHIER_PH1_PRO5: |
| 45 | ph1_pro5_init(param); |
| 46 | break; |
| 47 | #endif |
Masahiro Yamada | 019df87 | 2015-09-22 00:27:41 +0900 | [diff] [blame^] | 48 | #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 Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 55 | default: |
| 56 | break; |
| 57 | } |
| 58 | } |