summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2021-11-02 10:18:50 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-11-03 08:26:07 +0000
commitf50bf60bff9c73edc46e8ea19334c418aa477754 (patch)
tree7fe48a497bc67f2f66bf080b66bca3b65b5e1131 /src
parent5826c591bf2dabe02fda91afde293c4194b4007a (diff)
soc/mediatek/mt8195: move timer enum variables to timer_v2.h
Some enum variables of timer v2 are the same between MT8195 and MT8186, so we move them to common timer_v2.h. TEST=emerge-cherry coreboot BUG=b:200134633 Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: I89891a19e622aa24783025e73c38c4ffa43aa166 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58829 Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/mediatek/common/include/soc/timer_v2.h13
-rw-r--r--src/soc/mediatek/mt8195/include/soc/timer.h12
2 files changed, 13 insertions, 12 deletions
diff --git a/src/soc/mediatek/common/include/soc/timer_v2.h b/src/soc/mediatek/common/include/soc/timer_v2.h
index 507814b233..23059284ce 100644
--- a/src/soc/mediatek/common/include/soc/timer_v2.h
+++ b/src/soc/mediatek/common/include/soc/timer_v2.h
@@ -9,6 +9,19 @@
#define GPT_MHZ 13
+enum {
+ TIE_0_EN = 1 << 3,
+ COMP_15_EN = 1 << 10,
+ COMP_20_EN = 1 << 11,
+ COMP_25_EN = 1 << 12,
+
+ COMP_FEATURE_MASK = COMP_15_EN | COMP_20_EN | COMP_25_EN | TIE_0_EN,
+
+ COMP_15_MASK = COMP_15_EN,
+ COMP_20_MASK = COMP_20_EN | TIE_0_EN,
+ COMP_25_MASK = COMP_20_EN | COMP_25_EN,
+};
+
struct mtk_gpt_regs {
u32 reserved1[40];
u32 gpt6_con;
diff --git a/src/soc/mediatek/mt8195/include/soc/timer.h b/src/soc/mediatek/mt8195/include/soc/timer.h
index da073e1b7a..d2959bf874 100644
--- a/src/soc/mediatek/mt8195/include/soc/timer.h
+++ b/src/soc/mediatek/mt8195/include/soc/timer.h
@@ -5,16 +5,4 @@
#include <soc/timer_v2.h>
-enum {
- TIE_0_EN = 1 << 3,
- COMP_15_EN = 1 << 10,
- COMP_20_EN = 1 << 11,
- COMP_25_EN = 1 << 12,
-
- COMP_FEATURE_MASK = COMP_15_EN | COMP_20_EN | COMP_25_EN | TIE_0_EN,
-
- COMP_15_MASK = COMP_15_EN,
- COMP_20_MASK = COMP_20_EN | TIE_0_EN,
- COMP_25_MASK = COMP_20_EN | COMP_25_EN,
-};
#endif