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_LD20)
169 static const struct uniphier_board_data uniphier_ld20_data = {
183 .base = 0x100000000UL,
190 struct uniphier_board_id {
191 const char *compatible;
192 const struct uniphier_board_data *param;
195 static const struct uniphier_board_id uniphier_boards[] = {
196 #if defined(CONFIG_ARCH_UNIPHIER_SLD3)
197 { "socionext,ph1-sld3", &uniphier_sld3_data, },
199 #if defined(CONFIG_ARCH_UNIPHIER_LD4)
200 { "socionext,ph1-ld4", &uniphier_ld4_data, },
202 #if defined(CONFIG_ARCH_UNIPHIER_PRO4)
203 { "socionext,ph1-pro4-ace", &uniphier_pro4_2g_data, },
204 { "socionext,ph1-pro4-sanji", &uniphier_pro4_2g_data, },
205 { "socionext,ph1-pro4", &uniphier_pro4_data, },
207 #if defined(CONFIG_ARCH_UNIPHIER_SLD8)
208 { "socionext,ph1-sld8", &uniphier_sld8_data, },
210 #if defined(CONFIG_ARCH_UNIPHIER_PRO5)
211 { "socionext,ph1-pro5", &uniphier_pro5_data, },
213 #if defined(CONFIG_ARCH_UNIPHIER_PXS2)
214 { "socionext,proxstream2", &uniphier_pxs2_data, },
216 #if defined(CONFIG_ARCH_UNIPHIER_LD6B)
217 { "socionext,ph1-ld6b", &uniphier_ld6b_data, },
219 #if defined(CONFIG_ARCH_UNIPHIER_LD20)
220 { "socionext,ph1-ld20", &uniphier_ld20_data, },
224 const struct uniphier_board_data *uniphier_get_board_param(void)
228 for (i = 0; i < ARRAY_SIZE(uniphier_boards); i++) {
229 if (!fdt_node_check_compatible(gd->fdt_blob, 0,
230 uniphier_boards[i].compatible))
231 return uniphier_boards[i].param;