coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <arch/stages.h>
4 #include <boardid.h>
5 #include <soc/emi.h>
6 #include <soc/mmu_operations.h>
7 #include <soc/mt6391.h>
8 #include <soc/pll.h>
9 #include <soc/rtc.h>
10 #include <timer.h>
11 
13 {
14  int stabilize_usec;
15  struct stopwatch sw;
16 
17  rtc_boot();
18 
19  /* Raise CPU voltage to allow higher frequency */
20  stabilize_usec = mt6391_configure_ca53_voltage(1125000);
21 
22  stopwatch_init_usecs_expire(&sw, stabilize_usec);
23 
24  /* init memory */
26 
28 
29  /* Set to maximum frequency */
30  if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5)
32  else
34 
36 }
__weak void platform_romstage_main(void)
Definition: romstage.c:10
const struct sdram_info * get_sdram_config(void)
Definition: sdram_configs.c:85
#define MHz
Definition: helpers.h:80
void mt_mem_init(struct dramc_param *dparam)
Definition: memory.c:304
uint32_t board_id(void)
board_id() - Get the board version
Definition: ec_boardid.c:6
static void stopwatch_wait_until_expired(struct stopwatch *sw)
Definition: timer.h:161
static void stopwatch_init_usecs_expire(struct stopwatch *sw, long us)
Definition: timer.h:127
void mtk_mmu_after_dram(void)
int mt6391_configure_ca53_voltage(int uv)
Definition: mt6391.c:16
void mt_pll_raise_little_cpu_freq(u32 freq)
Definition: pll.c:420
void rtc_boot(void)
Definition: rtc_mt6359p.c:315