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> |
Masahiro Yamada | d5cf329 | 2016-03-18 16:41:52 +0900 | [diff] [blame] | 8 | #include <debug_uart.h> |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 9 | #include <spl.h> |
Masahiro Yamada | 107b3fb | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 10 | |
| 11 | #include "../init.h" |
| 12 | #include "../soc-info.h" |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 13 | |
Masahiro Yamada | 323d1f9 | 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 | d5cf329 | 2016-03-18 16:41:52 +0900 | [diff] [blame] | 18 | #ifdef CONFIG_DEBUG_UART |
| 19 | debug_uart_init(); |
| 20 | #endif |
| 21 | |
Masahiro Yamada | 6ba60fa | 2015-12-17 17:47:42 +0900 | [diff] [blame] | 22 | param = uniphier_get_board_param(); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 23 | if (!param) |
| 24 | hang(); |
| 25 | |
| 26 | switch (uniphier_get_soc_type()) { |
Masahiro Yamada | ea65c98 | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 27 | #if defined(CONFIG_ARCH_UNIPHIER_SLD3) |
| 28 | case SOC_UNIPHIER_SLD3: |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 29 | uniphier_sld3_init(param); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 30 | break; |
| 31 | #endif |
Masahiro Yamada | ea65c98 | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 32 | #if defined(CONFIG_ARCH_UNIPHIER_LD4) |
| 33 | case SOC_UNIPHIER_LD4: |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 34 | uniphier_ld4_init(param); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 35 | break; |
| 36 | #endif |
Masahiro Yamada | ea65c98 | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 37 | #if defined(CONFIG_ARCH_UNIPHIER_PRO4) |
| 38 | case SOC_UNIPHIER_PRO4: |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 39 | uniphier_pro4_init(param); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 40 | break; |
| 41 | #endif |
Masahiro Yamada | ea65c98 | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 42 | #if defined(CONFIG_ARCH_UNIPHIER_SLD8) |
| 43 | case SOC_UNIPHIER_SLD8: |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 44 | uniphier_sld8_init(param); |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 45 | break; |
| 46 | #endif |
Masahiro Yamada | ea65c98 | 2016-03-18 16:41:43 +0900 | [diff] [blame] | 47 | #if defined(CONFIG_ARCH_UNIPHIER_PRO5) |
| 48 | case SOC_UNIPHIER_PRO5: |
Masahiro Yamada | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 49 | uniphier_pro5_init(param); |
Masahiro Yamada | 28f40d4 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 50 | break; |
| 51 | #endif |
Masahiro Yamada | ea65c98 | 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 | 5b66006 | 2016-03-30 20:17:02 +0900 | [diff] [blame] | 55 | uniphier_pxs2_init(param); |
Masahiro Yamada | 019df87 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 56 | break; |
| 57 | #endif |
Masahiro Yamada | 667dbcd | 2016-05-24 21:14:01 +0900 | [diff] [blame] | 58 | #if defined(CONFIG_ARCH_UNIPHIER_LD11) |
| 59 | case SOC_UNIPHIER_LD11: |
| 60 | uniphier_ld11_init(param); |
| 61 | break; |
| 62 | #endif |
Masahiro Yamada | 9d0c2ce | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 63 | #if defined(CONFIG_ARCH_UNIPHIER_LD20) |
| 64 | case SOC_UNIPHIER_LD20: |
| 65 | uniphier_ld20_init(param); |
| 66 | break; |
| 67 | #endif |
Masahiro Yamada | 323d1f9 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 68 | default: |
| 69 | break; |
| 70 | } |
| 71 | } |