coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
md_ctrl.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/mmio.h>
4 #include <soc/addressmap.h>
5 #include <soc/infracfg.h>
6 #include <soc/pll.h>
7 #include <soc/md_ctrl.h>
8 
9 #define TOPCKGEN_CLK_MODE_MD_32K (1 << 8)
10 #define TOPCKGEN_CLK_MODE_MD_26M (1 << 9)
11 #define INFRA_MISC2_SRCCLKENA_RELEASE (0xFF)
12 
13 static void internal_md_power_down(void)
14 {
15  /* Gating MD clock */
16  setbits32(&mtk_topckgen->clk_mode,
18  /* Release SRCCLKENA */
21 }
22 
24 {
26 }
#define setbits32(addr, set)
Definition: mmio.h:21
#define clrbits32(addr, clear)
Definition: mmio.h:26
#define TOPCKGEN_CLK_MODE_MD_32K
Definition: md_ctrl.c:9
void mtk_md_early_init(void)
Definition: md_ctrl.c:23
#define TOPCKGEN_CLK_MODE_MD_26M
Definition: md_ctrl.c:10
#define INFRA_MISC2_SRCCLKENA_RELEASE
Definition: md_ctrl.c:11
static void internal_md_power_down(void)
Definition: md_ctrl.c:13
static struct mt8183_infracfg_regs *const mt8183_infracfg
Definition: infracfg.h:275
#define mtk_topckgen
Definition: pll_common.h:11