mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 18:11:33 +00:00
x86: fsp: Set up init runtime buffer in update_fsp_configs()
fsp_init() runtime buffer parameter might be different across different platforms. Move this to update_fsp_configs(). 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:
parent
4ce022d396
commit
214feec1c5
4 changed files with 18 additions and 9 deletions
|
@ -125,13 +125,19 @@ const struct pch_azalia_config azalia_config = {
|
||||||
* 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_configs(struct fsp_config_data *config)
|
void update_fsp_configs(struct fsp_config_data *config,
|
||||||
|
struct fspinit_rtbuf *rt_buf)
|
||||||
{
|
{
|
||||||
struct upd_region *fsp_upd = &config->fsp_upd;
|
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;
|
||||||
|
|
||||||
|
/* Initialize runtime buffer for fsp_init() */
|
||||||
|
rt_buf->common.stack_top = config->common.stack_top - 32;
|
||||||
|
rt_buf->common.boot_mode = config->common.boot_mode;
|
||||||
|
rt_buf->common.upd_data = &config->fsp_upd;
|
||||||
|
|
||||||
fsp_upd->azalia_config_ptr = (uint32_t)&azalia_config;
|
fsp_upd->azalia_config_ptr = (uint32_t)&azalia_config;
|
||||||
|
|
||||||
node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_BAYTRAIL_FSP);
|
node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_BAYTRAIL_FSP);
|
||||||
|
|
|
@ -8,7 +8,13 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/fsp/fsp_support.h>
|
#include <asm/fsp/fsp_support.h>
|
||||||
|
|
||||||
void update_fsp_configs(struct fsp_config_data *config)
|
void update_fsp_configs(struct fsp_config_data *config,
|
||||||
|
struct fspinit_rtbuf *rt_buf)
|
||||||
{
|
{
|
||||||
|
/* Initialize runtime buffer for fsp_init() */
|
||||||
|
rt_buf->common.stack_top = config->common.stack_top - 32;
|
||||||
|
rt_buf->common.boot_mode = config->common.boot_mode;
|
||||||
|
rt_buf->common.upd_data = &config->fsp_upd;
|
||||||
|
|
||||||
/* Override any UPD setting if required */
|
/* Override any UPD setting if required */
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,10 +194,12 @@ void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
|
||||||
* This function overrides the default configurations of FSP.
|
* This function overrides the default configurations of FSP.
|
||||||
*
|
*
|
||||||
* @config: A pointer to the FSP configuration data structure
|
* @config: A pointer to the FSP configuration data structure
|
||||||
|
* @rt_buf: A pointer to the FSP runtime buffer data structure
|
||||||
*
|
*
|
||||||
* @return: None
|
* @return: None
|
||||||
*/
|
*/
|
||||||
void update_fsp_configs(struct fsp_config_data *config);
|
void update_fsp_configs(struct fsp_config_data *config,
|
||||||
|
struct fspinit_rtbuf *rt_buf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
|
|
@ -144,13 +144,8 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
||||||
|
|
||||||
memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
|
memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
|
||||||
|
|
||||||
/* Initialize runtime buffer for fsp_init() */
|
|
||||||
rt_buf.common.stack_top = stack_top - 32;
|
|
||||||
rt_buf.common.boot_mode = boot_mode;
|
|
||||||
rt_buf.common.upd_data = fsp_upd;
|
|
||||||
|
|
||||||
/* Override any configuration if required */
|
/* Override any configuration if required */
|
||||||
update_fsp_configs(&config_data);
|
update_fsp_configs(&config_data, &rt_buf);
|
||||||
|
|
||||||
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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue