aboutsummaryrefslogtreecommitdiff
path: root/src/soc/mediatek/common
diff options
context:
space:
mode:
authorBo-Chen Chen <rex-bc.chen@mediatek.com>2022-08-18 18:28:27 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-08-31 16:47:22 +0000
commitdcdbda5c93bedbce202e2f55903a7f52dd4f84f6 (patch)
treea758281a6969a115bba5b366dba09f75622b20b9 /src/soc/mediatek/common
parentc0797f50e12b2c01701663d603d4b0112988877d (diff)
soc/mediatek/mt8188: Use MHz as unit for current_clk
The unit of current_clk in pmif_ulposc_check() should be MHz. We use pmif_get_ulposc_freq_mhz() to get the default hardware value in MHz. Without this modification, the judgement in pmif_ulposc_check() is alway wrong due to the wrong unit. TEST=build pass. BUG=b:233720142 Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com> Change-Id: I3bf80a23bb35ff657023eb4b7e009fa233f61244 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66971 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/common')
-rw-r--r--src/soc/mediatek/common/pmif_clk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/mediatek/common/pmif_clk.c b/src/soc/mediatek/common/pmif_clk.c
index b7f2228a76..cfd1dbce6b 100644
--- a/src/soc/mediatek/common/pmif_clk.c
+++ b/src/soc/mediatek/common/pmif_clk.c
@@ -10,13 +10,13 @@ int pmif_ulposc_check(u32 current_clk, u32 target_clk)
if (current_clk < (target_clk * (1000 - CAL_TOL_RATE) / 1000) ||
current_clk > (target_clk * (1000 + CAL_TOL_RATE) / 1000)) {
printk(BIOS_WARNING,
- "[%s] calibration fail: cur=%d, CAL_RATE=%d, target=%dM\n",
+ "[%s] calibration fail: cur=%dM, CAL_RATE=%d, target=%dM\n",
__func__, current_clk, CAL_TOL_RATE, target_clk);
return -1;
}
printk(BIOS_DEBUG,
- "[%s] calibration done: cur=%d, CAL_RATE=%d, target=%dM\n",
+ "[%s] calibration done: cur=%dM, CAL_RATE=%d, target=%dM\n",
__func__, current_clk, CAL_TOL_RATE, target_clk);
return 0;