coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
timer_v2.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef SOC_MEDIATEK_COMMON_TIMER_V2_H
4
#define SOC_MEDIATEK_COMMON_TIMER_V2_H
5
6
#include <
device/mmio.h
>
7
#include <
soc/timer_common.h
>
8
#include <types.h>
9
10
#define GPT_MHZ 13
11
12
enum
{
13
TIE_0_EN
= 1 << 3,
14
COMP_15_EN
= 1 << 10,
15
COMP_20_EN
= 1 << 11,
16
COMP_25_EN
= 1 << 12,
17
18
COMP_FEATURE_MASK
=
COMP_15_EN
|
COMP_20_EN
|
COMP_25_EN
|
TIE_0_EN
,
19
20
COMP_15_MASK
=
COMP_15_EN
,
21
COMP_20_MASK
=
COMP_20_EN
|
TIE_0_EN
,
22
COMP_25_MASK
=
COMP_20_EN
|
COMP_25_EN
,
23
};
24
25
struct
mtk_gpt_regs
{
26
u32
reserved1
[40];
27
u32
gpt6_con
;
28
u32
reserved2
;
29
u32
gpt6_cnt_l
;
30
u32
reserved3
;
31
u32
gpt6_cnt_h
;
32
};
33
34
check_member
(
mtk_gpt_regs
, gpt6_con, 0x00A0);
35
check_member
(
mtk_gpt_regs
, gpt6_cnt_l, 0x00A8);
36
check_member
(
mtk_gpt_regs
, gpt6_cnt_h, 0x00B0);
37
38
DEFINE_BIT
(GPT6_CON_EN6, 0)
39
DEFINE_BIT
(GPT6_CON_CLR6, 1)
40
DEFINE_BITFIELD
(GPT6_CON_MODE6, 6, 5)
41
42
#define GPT6_CLOCK_REG(x) x->gpt6_con
43
DEFINE_BITFIELD
(GPT6_CLK_CLKDIV6, 3, 0)
44
DEFINE_BITFIELD
(GPT6_CLK_CLK6, 13, 10)
45
46
#endif
mmio.h
DEFINE_BITFIELD
#define DEFINE_BITFIELD(name, high_bit, low_bit)
Definition:
mmio.h:124
DEFINE_BIT
#define DEFINE_BIT(name, bit)
Definition:
mmio.h:131
u32
uint32_t u32
Definition:
stdint.h:51
mtk_gpt_regs
Definition:
timer_v1.h:12
mtk_gpt_regs::reserved2
u32 reserved2[3]
Definition:
timer_v1.h:17
mtk_gpt_regs::reserved1
u32 reserved1[24]
Definition:
timer_v1.h:13
mtk_gpt_regs::gpt6_cnt_l
u32 gpt6_cnt_l
Definition:
timer_v1.h:16
mtk_gpt_regs::gpt6_con
u32 gpt6_con
Definition:
timer_v1.h:14
mtk_gpt_regs::reserved3
u32 reserved3
Definition:
timer_v2.h:30
mtk_gpt_regs::gpt6_cnt_h
u32 gpt6_cnt_h
Definition:
timer_v1.h:18
timer_common.h
check_member
check_member(mtk_gpt_regs, gpt6_con, 0x00A0)
COMP_20_MASK
@ COMP_20_MASK
Definition:
timer_v2.h:21
COMP_25_MASK
@ COMP_25_MASK
Definition:
timer_v2.h:22
TIE_0_EN
@ TIE_0_EN
Definition:
timer_v2.h:13
COMP_15_MASK
@ COMP_15_MASK
Definition:
timer_v2.h:20
COMP_25_EN
@ COMP_25_EN
Definition:
timer_v2.h:16
COMP_15_EN
@ COMP_15_EN
Definition:
timer_v2.h:14
COMP_FEATURE_MASK
@ COMP_FEATURE_MASK
Definition:
timer_v2.h:18
COMP_20_EN
@ COMP_20_EN
Definition:
timer_v2.h:15
src
soc
mediatek
common
include
soc
timer_v2.h
Generated by
1.9.1