mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-04 18:40:42 +09:00
8331188615
Since there is now a new version of the FSP and it is incompatible with the existing version, move the code into an fsp1 directory. This will allow us to put FSP v2 code into an fsp2 directory. Add a Kconfig which defines which version is in use. Some of the code in this new fsp1/ directory is generic across both FSPv1 and FSPv2. Future patches will address this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <fdtdec.h>
|
|
#include <asm/fsp1/fsp_support.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
void update_fsp_configs(struct fsp_config_data *config,
|
|
struct fspinit_rtbuf *rt_buf)
|
|
{
|
|
struct platform_config *plat_config = &config->plat_config;
|
|
struct memory_config *mem_config = &config->mem_config;
|
|
const void *blob = gd->fdt_blob;
|
|
int node;
|
|
|
|
node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_IVYBRIDGE_FSP);
|
|
if (node < 0) {
|
|
debug("%s: Cannot find FSP node\n", __func__);
|
|
return;
|
|
}
|
|
|
|
plat_config->enable_ht =
|
|
fdtdec_get_bool(blob, node, "fsp,enable-ht");
|
|
plat_config->enable_turbo =
|
|
fdtdec_get_bool(blob, node, "fsp,enable-turbo");
|
|
plat_config->enable_memory_down =
|
|
fdtdec_get_bool(blob, node, "fsp,enable-memory-down");
|
|
plat_config->enable_fast_boot =
|
|
fdtdec_get_bool(blob, node, "fsp,enable-fast-boot");
|
|
|
|
/* Initialize runtime buffer for fsp_init() */
|
|
rt_buf->stack_top = config->common.stack_top - 32;
|
|
rt_buf->boot_mode = config->common.boot_mode;
|
|
rt_buf->plat_config = plat_config;
|
|
|
|
if (plat_config->enable_memory_down)
|
|
rt_buf->mem_config = mem_config;
|
|
else
|
|
rt_buf->mem_config = NULL;
|
|
}
|