V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Elyes HAOUAS | ba6b06f3 | 2022-01-07 22:22:32 +0100 | [diff] [blame] | 2 | |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 3 | #include <assert.h> |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 4 | #include <fsp/api.h> |
| 5 | #include <soc/romstage.h> |
| 6 | #include <spd_bin.h> |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 7 | #include <soc/meminit.h> |
| 8 | #include <baseboard/variants.h> |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 9 | |
Zhuohao Lee | 09f3b6c | 2022-01-20 21:30:12 +0800 | [diff] [blame^] | 10 | void mainboard_memory_init_params(FSPM_UPD *memupd) |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 11 | { |
Zhuohao Lee | 09f3b6c | 2022-01-20 21:30:12 +0800 | [diff] [blame^] | 12 | FSP_M_CONFIG *m_cfg = &memupd->FspmConfig; |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 13 | const struct mb_cfg *mem_config = variant_memory_params(); |
| 14 | const bool half_populated = false; |
| 15 | |
| 16 | const struct mem_spd lp5_spd_info = { |
| 17 | .topo = MEM_TOPO_MEMORY_DOWN, |
| 18 | .cbfs_index = variant_memory_sku(), |
| 19 | }; |
| 20 | |
Subrata Banik | 0007fa9 | 2021-06-23 15:27:43 +0530 | [diff] [blame] | 21 | memcfg_init(m_cfg, mem_config, &lp5_spd_info, half_populated); |
V Sowmya | 738aaa2 | 2021-01-20 07:15:37 +0530 | [diff] [blame] | 22 | } |