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_PH1_SLD3)
16 static const struct uniphier_board_data ph1_sld3_data = {
37 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
38 static const struct uniphier_board_data ph1_ld4_data = {
41 .dram_ddr3plus = true,
55 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
57 static const struct uniphier_board_data ph1_pro4_data = {
73 static const struct uniphier_board_data ph1_pro4_2g_data = {
89 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
90 static const struct uniphier_board_data ph1_sld8_data = {
93 .dram_ddr3plus = true,
107 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
108 static const struct uniphier_board_data ph1_pro5_data = {
124 #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
125 static const struct uniphier_board_data proxstream2_data = {
146 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
147 static const struct uniphier_board_data ph1_ld6b_data = {
168 struct uniphier_board_id {
169 const char *compatible;
170 const struct uniphier_board_data *param;
173 static const struct uniphier_board_id uniphier_boards[] = {
174 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
175 { "socionext,ph1-sld3", &ph1_sld3_data, },
177 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
178 { "socionext,ph1-ld4", &ph1_ld4_data, },
180 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
181 { "socionext,ph1-pro4-ace", &ph1_pro4_2g_data, },
182 { "socionext,ph1-pro4-sanji", &ph1_pro4_2g_data, },
183 { "socionext,ph1-pro4", &ph1_pro4_data, },
185 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
186 { "socionext,ph1-sld8", &ph1_sld8_data, },
188 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
189 { "socionext,ph1-pro5", &ph1_pro5_data, },
191 #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
192 { "socionext,proxstream2", &proxstream2_data, },
194 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
195 { "socionext,ph1-ld6b", &ph1_ld6b_data, },
199 const struct uniphier_board_data *uniphier_get_board_param(void)
203 for (i = 0; i < ARRAY_SIZE(uniphier_boards); i++) {
204 if (!fdt_node_check_compatible(gd->fdt_blob, 0,
205 uniphier_boards[i].compatible))
206 return uniphier_boards[i].param;