blob: 809ea1fbf65b2845355891eb954cfc3da5aa896d [file] [log] [blame]
Tan, Lean Shengd2afd872020-11-18 04:37:59 -08001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <baseboard/variants.h>
Tan, Lean Shengd2afd872020-11-18 04:37:59 -08004#include <soc/meminit.h>
5#include <soc/romstage.h>
Tan, Lean Shengd2afd872020-11-18 04:37:59 -08006
7void mainboard_memory_init_params(FSPM_UPD *memupd)
8{
Tan, Lean Sheng344f68b2020-11-27 05:33:08 -08009 static struct spd_info ehlcrb_spd_info;
10 const struct mb_cfg *board_cfg = variant_memcfg_config();
11
12 /* TODO: Read the resistor strap to get number of memory segments */
13 bool half_populated = false;
14 /* Initialize spd information for LPDDR4x board */
15 ehlcrb_spd_info.read_type = READ_SPD_CBFS;
16 ehlcrb_spd_info.spd_spec.spd_index = 0x00;
17
18 /* Initialize variant specific configurations */
19 memcfg_init(&memupd->FspmConfig, board_cfg, &ehlcrb_spd_info, half_populated);
Tan, Lean Shengd2afd872020-11-18 04:37:59 -080020}