2 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <linux/kernel.h>
13 DECLARE_GLOBAL_DATA_PTR;
15 #if defined(CONFIG_ARCH_UNIPHIER_SLD3)
16 static const struct uniphier_board_data uniphier_sld3_data = {
37 #if defined(CONFIG_ARCH_UNIPHIER_LD4)
38 static const struct uniphier_board_data uniphier_ld4_data = {
41 .dram_ddr3plus = true,
55 #if defined(CONFIG_ARCH_UNIPHIER_PRO4)
57 static const struct uniphier_board_data uniphier_pro4_data = {
73 static const struct uniphier_board_data uniphier_pro4_2g_data = {
89 #if defined(CONFIG_ARCH_UNIPHIER_SLD8)
90 static const struct uniphier_board_data uniphier_sld8_data = {
93 .dram_ddr3plus = true,
107 #if defined(CONFIG_ARCH_UNIPHIER_PRO5)
108 static const struct uniphier_board_data uniphier_pro5_data = {
124 #if defined(CONFIG_ARCH_UNIPHIER_PXS2)
125 static const struct uniphier_board_data uniphier_pxs2_data = {
146 #if defined(CONFIG_ARCH_UNIPHIER_LD6B)
147 static const struct uniphier_board_data uniphier_ld6b_data = {
168 #if defined(CONFIG_ARCH_UNIPHIER_LD11)
169 static const struct uniphier_board_data uniphier_ld11_data = {
185 #if defined(CONFIG_ARCH_UNIPHIER_LD20)
186 static const struct uniphier_board_data uniphier_ld20_data = {
200 .base = 0x100000000UL,
207 struct uniphier_board_id {
208 const char *compatible;
209 const struct uniphier_board_data *param;
212 static const struct uniphier_board_id uniphier_boards[] = {
213 #if defined(CONFIG_ARCH_UNIPHIER_SLD3)
214 { "socionext,ph1-sld3", &uniphier_sld3_data, },
216 #if defined(CONFIG_ARCH_UNIPHIER_LD4)
217 { "socionext,ph1-ld4", &uniphier_ld4_data, },
219 #if defined(CONFIG_ARCH_UNIPHIER_PRO4)
220 { "socionext,ph1-pro4-ace", &uniphier_pro4_2g_data, },
221 { "socionext,ph1-pro4-sanji", &uniphier_pro4_2g_data, },
222 { "socionext,ph1-pro4", &uniphier_pro4_data, },
224 #if defined(CONFIG_ARCH_UNIPHIER_SLD8)
225 { "socionext,ph1-sld8", &uniphier_sld8_data, },
227 #if defined(CONFIG_ARCH_UNIPHIER_PRO5)
228 { "socionext,ph1-pro5", &uniphier_pro5_data, },
230 #if defined(CONFIG_ARCH_UNIPHIER_PXS2)
231 { "socionext,proxstream2", &uniphier_pxs2_data, },
233 #if defined(CONFIG_ARCH_UNIPHIER_LD6B)
234 { "socionext,ph1-ld6b", &uniphier_ld6b_data, },
236 #if defined(CONFIG_ARCH_UNIPHIER_LD11)
237 { "socionext,ph1-ld11", &uniphier_ld11_data, },
239 #if defined(CONFIG_ARCH_UNIPHIER_LD20)
240 { "socionext,ph1-ld20", &uniphier_ld20_data, },
244 const struct uniphier_board_data *uniphier_get_board_param(void)
248 for (i = 0; i < ARRAY_SIZE(uniphier_boards); i++) {
249 if (!fdt_node_check_compatible(gd->fdt_blob, 0,
250 uniphier_boards[i].compatible))
251 return uniphier_boards[i].param;