Tan, Lean Sheng | d2afd87 | 2020-11-18 04:37:59 -0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <baseboard/variants.h> |
Tan, Lean Sheng | d2afd87 | 2020-11-18 04:37:59 -0800 | [diff] [blame] | 4 | #include <soc/meminit.h> |
| 5 | #include <soc/romstage.h> |
Tan, Lean Sheng | d2afd87 | 2020-11-18 04:37:59 -0800 | [diff] [blame] | 6 | |
| 7 | void mainboard_memory_init_params(FSPM_UPD *memupd) |
| 8 | { |
Tan, Lean Sheng | 344f68b | 2020-11-27 05:33:08 -0800 | [diff] [blame] | 9 | 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 Sheng | d2afd87 | 2020-11-18 04:37:59 -0800 | [diff] [blame] | 20 | } |