From eb94a4a6de5d4de483c99cbaead364fdde73e2d1 Mon Sep 17 00:00:00 2001 From: Ryan Chuang Date: Fri, 6 Aug 2021 11:00:25 +0800 Subject: vc/mediatek/mt8195: Optimize DRAM init time by limiting frequency count Support the config MEDIATEK_DRAM_DVFS_LIMIT_FREQ_CNT to limit DRAM frequency counts to reduce DRAM initialization time by about 100ms. BUG=b:195274787 Signed-off-by: Ryan Chuang Change-Id: Ibcb9a50c24f428358ef682b64946d4c91ebd81d2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56849 Tested-by: build bot (Jenkins) Reviewed-by: Rex-BC Chen Reviewed-by: Yu-Ping Wu --- src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vendorcode/mediatek/mt8195') diff --git a/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c b/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c index b5de592c2b..b5b9ae1713 100644 --- a/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c +++ b/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c @@ -1882,6 +1882,9 @@ int Init_DRAM(DRAM_DRAM_TYPE_T dram_type, DRAM_CBT_MODE_EXTERN_T dram_cbt_mode_e ett_fix_freq = 1; /* only 1600 & 4266 */ #endif + if (CONFIG(MEDIATEK_DRAM_DVFS_LIMIT_FREQ_CNT)) + ett_fix_freq = 0x1; // 4266, 1600 + if (ett_fix_freq != 0xff) gAndroid_DVFS_en = FALSE; -- cgit v1.2.3