coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
timer_v1.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef SOC_MEDIATEK_COMMON_TIMER_V1_H
4 #define SOC_MEDIATEK_COMMON_TIMER_V1_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 struct mtk_gpt_regs {
19 };
20 
21 check_member(mtk_gpt_regs, gpt6_con, 0x0060);
22 check_member(mtk_gpt_regs, gpt6_clk, 0x0064);
23 check_member(mtk_gpt_regs, gpt6_cnt_l, 0x0068);
24 check_member(mtk_gpt_regs, gpt6_cnt_h, 0x0078);
25 
26 DEFINE_BIT(GPT6_CON_EN6, 0)
27 DEFINE_BIT(GPT6_CON_CLR6, 1)
28 DEFINE_BITFIELD(GPT6_CON_MODE6, 5, 4)
29 
30 #define GPT6_CLOCK_REG(x) x->gpt6_clk
31 DEFINE_BITFIELD(GPT6_CLK_CLKDIV6, 3, 0)
32 DEFINE_BIT(GPT6_CLK_CLK6, 4)
33 
34 #endif
#define DEFINE_BITFIELD(name, high_bit, low_bit)
Definition: mmio.h:124
#define DEFINE_BIT(name, bit)
Definition: mmio.h:131
uint32_t u32
Definition: stdint.h:51
u32 reserved2[3]
Definition: timer_v1.h:17
u32 reserved1[24]
Definition: timer_v1.h:13
u32 gpt6_cnt_l
Definition: timer_v1.h:16
u32 gpt6_con
Definition: timer_v1.h:14
u32 gpt6_clk
Definition: timer_v1.h:15
u32 gpt6_cnt_h
Definition: timer_v1.h:18
check_member(mtk_gpt_regs, gpt6_con, 0x0060)