diff options
author | Nick Vaccaro <nvaccaro@google.com> | 2020-02-04 20:40:47 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-02-11 07:52:47 +0000 |
commit | 75f0124c44a26aa2d71bb3cba7cdc42e224980ce (patch) | |
tree | fe7b07bb3fd2a8d42010de683ae180e5f3282acb /src/mainboard/google/volteer/romstage.c | |
parent | 5b43484db3b41ec2b9664ef73b7e613eed813374 (diff) | |
download | coreboot-75f0124c44a26aa2d71bb3cba7cdc42e224980ce.tar.gz coreboot-75f0124c44a26aa2d71bb3cba7cdc42e224980ce.tar.bz2 coreboot-75f0124c44a26aa2d71bb3cba7cdc42e224980ce.zip |
mb/google/volteer: use new Tiger Lake memory config
Some of the common memory code that was being performed in
mainboard has moved into the soc to reduce redundant code.
This change adapts volteer to use Tiger Lake's new common code.
BUG=b:145642089, b:145238504, b:145564831
BRANCH=none
TEST="emerge-volteer coreboot chromeos-bootimage", flash and boot
volteer, boot to kernel, "cat /proc/meminfo" and verify it reports
"MemTotal: 8038196 kB".
Change-Id: I32c9b8a040728d44565806eece6cf60b6b6073b6
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38715
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard/google/volteer/romstage.c')
-rw-r--r-- | src/mainboard/google/volteer/romstage.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mainboard/google/volteer/romstage.c b/src/mainboard/google/volteer/romstage.c new file mode 100644 index 000000000000..7e87a2ad7872 --- /dev/null +++ b/src/mainboard/google/volteer/romstage.c @@ -0,0 +1,29 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2020 The coreboot project Authors. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include <baseboard/variants.h> +#include <gpio.h> +#include <soc/gpio.h> +#include <soc/meminit_tgl.h> +#include <soc/romstage.h> +#include <variant/gpio.h> + +#include <fsp/soc_binding.h> + +void mainboard_memory_init_params(FSPM_UPD *mupd) +{ + FSP_M_CONFIG *mem_cfg = &mupd->FspmConfig; + const struct mb_lpddr4x_cfg *board_cfg = variant_memory_params(); + const struct spd_info spd_info = { + .read_type = READ_SPD_CBFS, + .spd_spec.spd_index = variant_memory_sku(), + }; + bool half_populated = gpio_get(GPIO_MEM_CH_SEL); + + meminit_lpddr4x_dimm0(mem_cfg, board_cfg, &spd_info, half_populated); +} |