mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 01:32:47 +02:00
x86: fsp: Rename update_fsp_upd() and change its signature
To support platform-specific configurations (might not always be UPD on some platform), use a better name update_fsp_configs() and accepct struct fsp_config_data as its parameter so that platform codes can handle whatever configuration data for that FSP. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -121,12 +121,13 @@ const struct pch_azalia_config azalia_config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the FSP's UPD.
|
* Override the FSP's configuration data.
|
||||||
* If the device tree does not specify an integer setting, use the default
|
* If the device tree does not specify an integer setting, use the default
|
||||||
* provided in Intel's Baytrail_FSP_Gold4.tgz release FSP/BayleyBayFsp.bsf file.
|
* provided in Intel's Baytrail_FSP_Gold4.tgz release FSP/BayleyBayFsp.bsf file.
|
||||||
*/
|
*/
|
||||||
void update_fsp_upd(struct upd_region *fsp_upd)
|
void update_fsp_configs(struct fsp_config_data *config)
|
||||||
{
|
{
|
||||||
|
struct upd_region *fsp_upd = &config->fsp_upd;
|
||||||
struct memory_down_data *mem;
|
struct memory_down_data *mem;
|
||||||
const void *blob = gd->fdt_blob;
|
const void *blob = gd->fdt_blob;
|
||||||
int node;
|
int node;
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/fsp/fsp_support.h>
|
#include <asm/fsp/fsp_support.h>
|
||||||
|
|
||||||
void update_fsp_upd(struct upd_region *fsp_upd)
|
void update_fsp_configs(struct fsp_config_data *config)
|
||||||
{
|
{
|
||||||
/* Override any UPD setting if required */
|
/* Override any UPD setting if required */
|
||||||
|
|
||||||
|
@@ -192,13 +192,13 @@ void *fsp_get_nvs_data(const void *hob_list, u32 *len);
|
|||||||
void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
|
void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function overrides the default configurations in the UPD data region.
|
* This function overrides the default configurations of FSP.
|
||||||
*
|
*
|
||||||
* @fsp_upd: A pointer to the upd_region data strcture
|
* @config: A pointer to the FSP configuration data structure
|
||||||
*
|
*
|
||||||
* @return: None
|
* @return: None
|
||||||
*/
|
*/
|
||||||
void update_fsp_upd(struct upd_region *fsp_upd);
|
void update_fsp_configs(struct fsp_config_data *config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fsp_init_phase_pci() - Tell the FSP that we have completed PCI init
|
* fsp_init_phase_pci() - Tell the FSP that we have completed PCI init
|
||||||
|
@@ -118,6 +118,10 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
|||||||
panic("Invalid FSP header");
|
panic("Invalid FSP header");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config_data.common.fsp_hdr = fsp_hdr;
|
||||||
|
config_data.common.stack_top = stack_top;
|
||||||
|
config_data.common.boot_mode = boot_mode;
|
||||||
|
|
||||||
fsp_upd = &config_data.fsp_upd;
|
fsp_upd = &config_data.fsp_upd;
|
||||||
memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
|
memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
|
||||||
|
|
||||||
@@ -140,8 +144,8 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
|||||||
/* Verify the UPD data region is valid */
|
/* Verify the UPD data region is valid */
|
||||||
assert(fsp_upd->terminator == UPD_TERMINATOR);
|
assert(fsp_upd->terminator == UPD_TERMINATOR);
|
||||||
|
|
||||||
/* Override any UPD setting if required */
|
/* Override any configuration if required */
|
||||||
update_fsp_upd(fsp_upd);
|
update_fsp_configs(&config_data);
|
||||||
|
|
||||||
memset(¶ms, 0, sizeof(struct fsp_init_params));
|
memset(¶ms, 0, sizeof(struct fsp_init_params));
|
||||||
params.nvs_buf = nvs_buf;
|
params.nvs_buf = nvs_buf;
|
||||||
@@ -151,10 +155,6 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
|||||||
init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
|
init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
|
||||||
params_ptr = ¶ms;
|
params_ptr = ¶ms;
|
||||||
|
|
||||||
config_data.common.fsp_hdr = fsp_hdr;
|
|
||||||
config_data.common.stack_top = stack_top;
|
|
||||||
config_data.common.boot_mode = boot_mode;
|
|
||||||
|
|
||||||
post_code(POST_PRE_MRC);
|
post_code(POST_PRE_MRC);
|
||||||
|
|
||||||
/* Load GDT for FSP */
|
/* Load GDT for FSP */
|
||||||
|
Reference in New Issue
Block a user