soc/intel/alderlake: Update mainboard_memory_init_params() argument

This patch updates mainboard_memory_init_params() function argument from
FSPM_UPD to FSP_M_CONFIG. Ideally mainboard_memory_init_params()
function don't need to override anything other than FSP_M_CONFIG UPDs
hence passing config block alone rather passing entire FSP-M UPD
structure.

Change-Id: I238870478a1427918abf888d71ba9c9fa80d3427
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55785
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Subrata Banik 2021-06-23 15:27:43 +05:30
parent b03cadf84b
commit 0007fa96a1
5 changed files with 10 additions and 10 deletions

View File

@ -6,7 +6,7 @@
#include <gpio.h> #include <gpio.h>
#include <soc/romstage.h> #include <soc/romstage.h>
void mainboard_memory_init_params(FSPM_UPD *memupd) void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg)
{ {
const struct mb_cfg *mem_config = variant_memory_params(); const struct mb_cfg *mem_config = variant_memory_params();
bool half_populated = variant_is_half_populated(); bool half_populated = variant_is_half_populated();
@ -16,5 +16,5 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
.cbfs_index = variant_memory_sku(), .cbfs_index = variant_memory_sku(),
}; };
memcfg_init(&memupd->FspmConfig, mem_config, &spd_info, half_populated); memcfg_init(m_cfg, mem_config, &spd_info, half_populated);
} }

View File

@ -24,7 +24,7 @@ static size_t get_spd_index(void)
return spd_index; return spd_index;
} }
void mainboard_memory_init_params(FSPM_UPD *mupd) void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg)
{ {
const struct mb_cfg *mem_config = variant_memory_params(); const struct mb_cfg *mem_config = variant_memory_params();
int board_id = get_board_id(); int board_id = get_board_id();
@ -54,7 +54,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
case ADL_P_DDR4_2: case ADL_P_DDR4_2:
case ADL_P_DDR5_1: case ADL_P_DDR5_1:
case ADL_P_DDR5_2: case ADL_P_DDR5_2:
memcfg_init(&mupd->FspmConfig, mem_config, &ddr4_ddr5_spd_info, half_populated); memcfg_init(m_cfg, mem_config, &ddr4_ddr5_spd_info, half_populated);
break; break;
case ADL_P_LP4_1: case ADL_P_LP4_1:
case ADL_P_LP4_2: case ADL_P_LP4_2:
@ -62,7 +62,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
case ADL_P_LP5_2: case ADL_P_LP5_2:
case ADL_M_LP4: case ADL_M_LP4:
case ADL_M_LP5: case ADL_M_LP5:
memcfg_init(&mupd->FspmConfig, mem_config, &lp4_lp5_spd_info, half_populated); memcfg_init(m_cfg, mem_config, &lp4_lp5_spd_info, half_populated);
break; break;
default: default:
die("Unknown board id = 0x%x\n", board_id); die("Unknown board id = 0x%x\n", board_id);

View File

@ -9,7 +9,7 @@
#include <baseboard/variants.h> #include <baseboard/variants.h>
#include <cbfs.h> #include <cbfs.h>
void mainboard_memory_init_params(FSPM_UPD *mupd) void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg)
{ {
const struct mb_cfg *mem_config = variant_memory_params(); const struct mb_cfg *mem_config = variant_memory_params();
const bool half_populated = false; const bool half_populated = false;
@ -19,5 +19,5 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
.cbfs_index = variant_memory_sku(), .cbfs_index = variant_memory_sku(),
}; };
memcfg_init(&mupd->FspmConfig, mem_config, &lp5_spd_info, half_populated); memcfg_init(m_cfg, mem_config, &lp5_spd_info, half_populated);
} }

View File

@ -6,7 +6,7 @@
#include <fsp/api.h> #include <fsp/api.h>
#include <stddef.h> #include <stddef.h>
void mainboard_memory_init_params(FSPM_UPD *mupd); void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg);
void systemagent_early_init(void); void systemagent_early_init(void);
/* Board type */ /* Board type */

View File

@ -345,10 +345,10 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
config = config_of_soc(); config = config_of_soc();
soc_memory_init_params(m_cfg, config); soc_memory_init_params(m_cfg, config);
mainboard_memory_init_params(mupd); mainboard_memory_init_params(m_cfg);
} }
__weak void mainboard_memory_init_params(FSPM_UPD *mupd) __weak void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg)
{ {
printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
} }