2 * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/fsp/fsp_support.h>
11 DECLARE_GLOBAL_DATA_PTR;
13 void update_fsp_configs(struct fsp_config_data *config,
14 struct fspinit_rtbuf *rt_buf)
16 struct platform_config *plat_config = &config->plat_config;
17 struct memory_config *mem_config = &config->mem_config;
18 const void *blob = gd->fdt_blob;
21 node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_IVYBRIDGE_FSP);
23 debug("%s: Cannot find FSP node\n", __func__);
27 plat_config->enable_ht =
28 fdtdec_get_bool(blob, node, "fsp,enable-ht");
29 plat_config->enable_turbo =
30 fdtdec_get_bool(blob, node, "fsp,enable-turbo");
31 plat_config->enable_memory_down =
32 fdtdec_get_bool(blob, node, "fsp,enable-memory-down");
33 plat_config->enable_fast_boot =
34 fdtdec_get_bool(blob, node, "fsp,enable-fast-boot");
36 /* Initialize runtime buffer for fsp_init() */
37 rt_buf->stack_top = config->common.stack_top - 32;
38 rt_buf->boot_mode = config->common.boot_mode;
39 rt_buf->plat_config = plat_config;
41 if (plat_config->enable_memory_down)
42 rt_buf->mem_config = mem_config;
44 rt_buf->mem_config = NULL;