coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
rtc.c File Reference
#include <delay.h>
#include <soc/rtc.h>
#include <soc/rtc_common.h>
#include <soc/mt6391.h>
#include <soc/pmic_wrap.h>
#include <types.h>
Include dependency graph for rtc.c:

Go to the source code of this file.

Functions

static bool rtc_gpio_init (void)
 
void rtc_osc_init (void)
 
static bool rtc_lpd_init (void)
 
int rtc_init (int recover)
 
static void rtc_bbpu_power_on (void)
 
void rtc_boot (void)
 

Function Documentation

◆ rtc_bbpu_power_on()

static void rtc_bbpu_power_on ( void  )
static

Definition at line 122 of file rtc.c.

References BIT, PMIC_RG_DCXO_CON2, PMIC_RG_DCXO_FORCE_MODE1, PMIC_RG_DCXO_POR2_CON3, PMIC_RG_TOP_CKPDN2, pwrap_write_field(), RTC_BBPU, RTC_BBPU_AUTO, RTC_BBPU_BBPU, RTC_BBPU_KEY, RTC_BBPU_PWREN, rtc_info, rtc_read(), rtc_write(), and rtc_write_trigger().

Referenced by rtc_boot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtc_boot()

void rtc_boot ( void  )

Definition at line 149 of file rtc.c.

References PMIC_RG_TOP_CKPDN, PMIC_RG_TOP_CKPDN2, rtc_bbpu_power_on(), rtc_boot_common(), and rtc_write().

Here is the call graph for this function:

◆ rtc_gpio_init()

static bool rtc_gpio_init ( void  )
static

Definition at line 11 of file rtc.c.

References MT6391_GPIO_PULL_DISABLE, MT6391_GPIO_PULL_DOWN, mt6391_gpio_set_pull(), RTC_CON, RTC_CON_F32KOB, RTC_CON_GOE, RTC_CON_GPEN, RTC_CON_LPEN, RTC_CON_LPRST, RTC_CON_LPSTA_RAW, rtc_read(), rtc_write(), and rtc_write_trigger().

Referenced by rtc_init(), and rtc_osc_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtc_init()

◆ rtc_lpd_init()

static bool rtc_lpd_init ( void  )
static

Definition at line 42 of file rtc.c.

References pwrap_write_field(), RTC_CON, RTC_CON_LPEN, RTC_CON_LPRST, and rtc_write_trigger().

Referenced by rtc_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtc_osc_init()

void rtc_osc_init ( void  )

Definition at line 28 of file rtc.c.

References PMIC_RG_TOP_CKTST2, rtc_eosc_cali(), rtc_gpio_init(), rtc_info, RTC_OSC32CON, rtc_read(), rtc_write(), rtc_xosc_write(), and RTC_XOSCCALI_MASK.

Referenced by rtc_boot_common(), and rtc_init().

Here is the call graph for this function:
Here is the caller graph for this function: