diff options
author | Yidi Lin <yidi.lin@mediatek.com> | 2021-02-09 19:15:04 +0800 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2021-04-26 02:42:56 +0000 |
commit | 49b47eab8116b7a0040635fe7d3d31100c0bdb46 (patch) | |
tree | dbd40754be932e835932dbd35645860e55a8c5da | |
parent | 450fbe042e5b427d7e49fffe65483f7d97fd3431 (diff) | |
download | coreboot-49b47eab8116b7a0040635fe7d3d31100c0bdb46.tar.gz coreboot-49b47eab8116b7a0040635fe7d3d31100c0bdb46.tar.bz2 coreboot-49b47eab8116b7a0040635fe7d3d31100c0bdb46.zip |
soc/mediatek/mt8192: Remove redundant SPM register definition
A complete SPM register definition is defined in include/soc/spm.h.
Remove the redundant definition from include/soc/pmif_spmi.h.
TEST=emerge-asurada coreboot
BRANCH=asurada
Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Change-Id: If55e7adabdf32bb4312b910dce9a55621a8da380
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52561
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r-- | src/soc/mediatek/mt8192/include/soc/pmif_spmi.h | 8 | ||||
-rw-r--r-- | src/soc/mediatek/mt8192/include/soc/spm.h | 1 | ||||
-rw-r--r-- | src/soc/mediatek/mt8192/pmif_clk.c | 5 |
3 files changed, 4 insertions, 10 deletions
diff --git a/src/soc/mediatek/mt8192/include/soc/pmif_spmi.h b/src/soc/mediatek/mt8192/include/soc/pmif_spmi.h index d89a07212385..d599f8cc8877 100644 --- a/src/soc/mediatek/mt8192/include/soc/pmif_spmi.h +++ b/src/soc/mediatek/mt8192/include/soc/pmif_spmi.h @@ -24,13 +24,6 @@ struct mtk_iocfg_bm_regs { }; check_member(mtk_iocfg_bm_regs, drv_cfg2, 0x20); -struct mtk_spm_regs { - u32 poweron_config_en; - u32 reserved[263]; - u32 ulposc_con; -}; -check_member(mtk_spm_regs, ulposc_con, 0x420); - struct mtk_spmi_mst_reg { u32 op_st_ctrl; u32 grp_id_en; @@ -53,7 +46,6 @@ check_member(mtk_spmi_mst_reg, mst_dbg, 0xfc); #define mtk_rug ((struct mtk_rgu_regs *)RGU_BASE) #define mtk_iocfg_bm ((struct mtk_iocfg_bm_regs *)IOCFG_BM_BASE) -#define mtk_spm ((struct mtk_spm_regs *)SPM_BASE) #define mtk_spmi_mst ((struct mtk_spmi_mst_reg *)SPMI_MST_BASE) struct cali { diff --git a/src/soc/mediatek/mt8192/include/soc/spm.h b/src/soc/mediatek/mt8192/include/soc/spm.h index e2bd3af20e1f..8f69bf7efb03 100644 --- a/src/soc/mediatek/mt8192/include/soc/spm.h +++ b/src/soc/mediatek/mt8192/include/soc/spm.h @@ -639,6 +639,7 @@ check_member(mtk_spm_regs, root_core_addr, 0x2a4); check_member(mtk_spm_regs, spm2sw_mailbox_0, 0x2d0); check_member(mtk_spm_regs, peri_pwr_con, 0x3c8); check_member(mtk_spm_regs, spm_mem_ck_sel, 0x400); +check_member(mtk_spm_regs, ulposc_con, 0x420); check_member(mtk_spm_regs, spm_force_dvfs, 0x4fc); check_member(mtk_spm_regs, spm_sw_flag_0, 0x600); check_member(mtk_spm_regs, spm_sw_flag_1, 0x608); diff --git a/src/soc/mediatek/mt8192/pmif_clk.c b/src/soc/mediatek/mt8192/pmif_clk.c index 4e68f3e7b0b8..cdcdacc91cfb 100644 --- a/src/soc/mediatek/mt8192/pmif_clk.c +++ b/src/soc/mediatek/mt8192/pmif_clk.c @@ -10,6 +10,7 @@ #include <soc/pmif.h> #include <soc/pmif_sw.h> #include <soc/pmif_spmi.h> +#include <soc/spm.h> /* APMIXED, ULPOSC1_CON0 */ DEFINE_BITFIELD(OSC1_CALI, 6, 0) @@ -130,8 +131,8 @@ static int pmif_init_ulposc(void) pmif_ulposc_config(); /* enable spm swinf */ - if (!READ32_BITFIELD(&mtk_spm->poweron_config_en, BCLK_CG_EN)) - SET32_BITFIELDS(&mtk_spm->poweron_config_en, BCLK_CG_EN, 1, + if (!READ32_BITFIELD(&mtk_spm->poweron_config_set, BCLK_CG_EN)) + SET32_BITFIELDS(&mtk_spm->poweron_config_set, BCLK_CG_EN, 1, PROJECT_CODE, 0xb16); /* turn on ulposc */ |