From a06175523ca642985f87711fb1957e57e0025137 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Wed, 21 Feb 2024 18:52:05 +0800 Subject: soc/mediatek: Add `MEDIATEK_DRAM_ADAPTIVE` config to support dram adaptive Starting from MT8195, MediaTek platform supports "dram adaptive" to automatically detect dram information, including channel, rank, die size..., and can automatically configure EMI settings. So we can just pass a placeholder param blob to `mt_mem_init_run` by enabling this option. Platforms (MT8173, MT8183, MT8192) which do not support "dram adaptive" need to implement `get_sdram_config` to get onboard DRAM configuration info. TEST=emerge-geralt coreboot && emerge-asurada coreboot TEST=CONFIG_MEDIATEK_DRAM_ADAPTIVE is set to y on geralt TEST=CONFIG_MEDIATEK_DRAM_ADAPTIVE is no set on asurada Change-Id: I05a01b1ab13fbf19b2a908c48a540a5c2e1ccbdc Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/80687 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/mainboard/google/geralt/Makefile.mk | 1 - src/mainboard/google/geralt/sdram_configs.c | 15 --------------- 2 files changed, 16 deletions(-) delete mode 100644 src/mainboard/google/geralt/sdram_configs.c (limited to 'src/mainboard/google/geralt') diff --git a/src/mainboard/google/geralt/Makefile.mk b/src/mainboard/google/geralt/Makefile.mk index b1af289d55..0975c5cd29 100644 --- a/src/mainboard/google/geralt/Makefile.mk +++ b/src/mainboard/google/geralt/Makefile.mk @@ -15,7 +15,6 @@ romstage-y += chromeos.c romstage-y += regulator.c romstage-y += reset.c romstage-y += romstage.c -romstage-y += sdram_configs.c ramstage-y += memlayout.ld ramstage-y += boardid.c diff --git a/src/mainboard/google/geralt/sdram_configs.c b/src/mainboard/google/geralt/sdram_configs.c deleted file mode 100644 index c4766be235..0000000000 --- a/src/mainboard/google/geralt/sdram_configs.c +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include - -const struct sdram_info *get_sdram_config(void) -{ - /* - * The MT8188 platform supports "dram adaptive" feature to automatically - * detect dram information, including channel, rank, die size..., and - * can automatically configure EMI settings. Therefore, we will be - * passing a placeholder param blob. - */ - static struct sdram_info params; - return ¶ms; -} -- cgit v1.2.3