From 02d9071a0b4d0720dde569de9550c17d89bc100a Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Tue, 29 Oct 2019 16:20:35 +0800 Subject: soc/mediatek/mt8183: Disable DRAM DVFS in recovery mode Currently full calibration with DVFS (which implies tripling memory training time for multiple frequencies) will be run in recovery mode, which takes up to 30 seconds with serial console enabled. However, in recovery mode the system should be running only the recovery programs with minimal services. DVFS should be not needed. In order to improve stability and system boot time, we want to disable DVFS training in recovery mode. BRANCH=kukui BUG=b:142358843 TEST=emerge-kukui coreboot Change-Id: I4f1b1b020eba9bfce21655169bcb31b98d54b010 Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/36456 Reviewed-by: Hung-Te Lin Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8183/memory.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/soc/mediatek/mt8183/memory.c') diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c index b9ed619a8e..13c3d9ad36 100644 --- a/src/soc/mediatek/mt8183/memory.c +++ b/src/soc/mediatek/mt8183/memory.c @@ -166,6 +166,10 @@ void mt_mem_init(struct dramc_param_ops *dparam_ops) const bool recovery_mode = vboot_recovery_mode_enabled(); + /* DRAM DVFS is disabled in recovery mode */ + if (CONFIG(MT8183_DRAM_DVFS) && !recovery_mode) + config |= DRAMC_CONFIG_DVFS; + /* Load calibration params from flash and run fast calibration */ if (recovery_mode) { printk(BIOS_WARNING, "Skip loading cached calibration data\n"); -- cgit v1.2.3