summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8186
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2024-11-20 15:41:57 +0800
committerYu-Ping Wu <yupingso@google.com>2024-11-21 16:13:48 +0000
commit37d4d7ab11ed669ba6a37adafad97e473cd341a9 (patch)
treee0c19db69f95902e7f1ed3dc494207fb72956780 /src/soc/mediatek/mt8186
parent4ed67d92eb821632087f364b4f925078a4383212 (diff)
soc/mediatek: Rename FREQ_*MHZ to PMIF_TARGET_FREQ_MHZ
Enum is useful for improving readability because of the meaningful enum names. Names such as "FREQ_260MHZ = 260", however, don't provide any extra information of the value itself. Therefore, rename those enums to PMIF_TARGET_FREQ_MHZ to better reflect its usage. Change-Id: I420b909a76973a040b96feb2bcb93d3640b086b5 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85204 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8186')
-rw-r--r--src/soc/mediatek/mt8186/include/soc/pmif.h2
-rw-r--r--src/soc/mediatek/mt8186/pmif_clk.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/mediatek/mt8186/include/soc/pmif.h b/src/soc/mediatek/mt8186/include/soc/pmif.h
index 141caa3a31..503a70f1b0 100644
--- a/src/soc/mediatek/mt8186/include/soc/pmif.h
+++ b/src/soc/mediatek/mt8186/include/soc/pmif.h
@@ -133,7 +133,7 @@ check_member(mtk_pmif_regs, swinf_0_acc, 0x800);
#define PMIF_SPI_AP_CHAN (PMIF_SPI_BASE + 0xC20)
enum {
- FREQ_250MHZ = 250,
+ PMIF_TARGET_FREQ_MHZ = 250,
};
/* calibation tolerance rate, unit: 0.1% */
diff --git a/src/soc/mediatek/mt8186/pmif_clk.c b/src/soc/mediatek/mt8186/pmif_clk.c
index 4cdc7106ae..58179dd4b6 100644
--- a/src/soc/mediatek/mt8186/pmif_clk.c
+++ b/src/soc/mediatek/mt8186/pmif_clk.c
@@ -42,7 +42,7 @@ int pmif_clk_init(void)
/* get hardware default value */
ulposc = pmif_get_ulposc_freq_mhz(ULPOSC1_RG_OSC_DIV);
- if (pmif_ulposc_check(ulposc, FREQ_250MHZ))
+ if (pmif_ulposc_check(ulposc, PMIF_TARGET_FREQ_MHZ))
die("ERROR: failed to meet ulposc frequency\n");
mt_pll_spmi_mux_select();