From 45727275476a495044e205ae8fb273feda3f8d5d Mon Sep 17 00:00:00 2001 From: Ryan Chuang Date: Tue, 10 Aug 2021 10:08:49 +0800 Subject: vc/mediatek/mt8195: Optimize DRAM init time by disabling Vcore setting Remove the unnecessary Vcore setting for the DVFS feature. Signed-off-by: Ryan Chuang Change-Id: If3c28e57a559a7ec04319c1a489138817e44ec4a Reviewed-on: https://review.coreboot.org/c/coreboot/+/56907 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 f39023bd14..501f9d3785 100644 --- a/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c +++ b/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c @@ -229,8 +229,9 @@ void vSetVcoreByFreq(DRAMC_CTX_T *p) } #endif - if (vcore) - dramc_set_vcore_voltage(vcore); + if (CONFIG(MEDIATEK_DRAM_DVFS)) + if (vcore) + dramc_set_vcore_voltage(vcore); #if defined(DRAM_HQA) if (vio18) @@ -1884,7 +1885,7 @@ 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)) + if (!CONFIG(MEDIATEK_DRAM_DVFS)) ett_fix_freq = 0x1; // 4266, 1600 if (ett_fix_freq != 0xff) -- cgit v1.2.3