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
{
13
u32
reserved1
[24];
14
u32
gpt6_con
;
15
u32
gpt6_clk
;
16
u32
gpt6_cnt_l
;
17
u32
reserved2
[3];
18
u32
gpt6_cnt_h
;
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
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::gpt6_clk
u32 gpt6_clk
Definition:
timer_v1.h:15
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, 0x0060)
src
soc
mediatek
common
include
soc
timer_v1.h
Generated by
1.9.1