Masahiro Yamada | 75f16f8 | 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> |
Masahiro Yamada | 52f0c51 | 2016-03-18 16:41:52 +0900 | [diff] [blame] | 8 | #include <debug_uart.h> |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 9 | #include <spl.h> |
Masahiro Yamada | efdf340 | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 10 | |
| 11 | #include "../init.h" |
| 12 | #include "../soc-info.h" |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 13 | |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 14 | void spl_board_init(void) |
| 15 | { |
| 16 | const struct uniphier_board_data *param; |
| 17 | |
Masahiro Yamada | 52f0c51 | 2016-03-18 16:41:52 +0900 | [diff] [blame] | 18 | #ifdef CONFIG_DEBUG_UART |
| 19 | debug_uart_init(); |
| 20 | #endif |
| 21 | |
Masahiro Yamada | c93f279 | 2015-12-17 17:47:42 +0900 | [diff] [blame] | 22 | param = uniphier_get_board_param(); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 23 | if (!param) |
| 24 | hang(); |
| 25 | |
| 26 | switch (uniphier_get_soc_type()) { |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 27 | #if defined(CONFIG_ARCH_UNIPHIER_SLD3) |
| 28 | case SOC_UNIPHIER_SLD3: |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame^] | 29 | uniphier_sld3_init(param); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 30 | break; |
| 31 | #endif |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 32 | #if defined(CONFIG_ARCH_UNIPHIER_LD4) |
| 33 | case SOC_UNIPHIER_LD4: |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame^] | 34 | uniphier_ld4_init(param); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 35 | break; |
| 36 | #endif |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 37 | #if defined(CONFIG_ARCH_UNIPHIER_PRO4) |
| 38 | case SOC_UNIPHIER_PRO4: |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame^] | 39 | uniphier_pro4_init(param); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 40 | break; |
| 41 | #endif |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 42 | #if defined(CONFIG_ARCH_UNIPHIER_SLD8) |
| 43 | case SOC_UNIPHIER_SLD8: |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame^] | 44 | uniphier_sld8_init(param); |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 45 | break; |
| 46 | #endif |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 47 | #if defined(CONFIG_ARCH_UNIPHIER_PRO5) |
| 48 | case SOC_UNIPHIER_PRO5: |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame^] | 49 | uniphier_pro5_init(param); |
Masahiro Yamada | d5167d5 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 50 | break; |
| 51 | #endif |
Masahiro Yamada | 53c59ae | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 52 | #if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B) |
| 53 | case SOC_UNIPHIER_PXS2: |
| 54 | case SOC_UNIPHIER_LD6B: |
Masahiro Yamada | 9890569 | 2016-03-30 20:17:02 +0900 | [diff] [blame^] | 55 | uniphier_pxs2_init(param); |
Masahiro Yamada | 1fe65d3 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 56 | break; |
| 57 | #endif |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 58 | default: |
| 59 | break; |
| 60 | } |
| 61 | } |