![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <delay.h>
#include <halt.h>
#include <soc/rtc.h>
#include <soc/rtc_common.h>
#include <soc/mt6358.h>
#include <soc/pmic_wrap.h>
#include <timer.h>
Go to the source code of this file.
Functions | |
static bool | rtc_enable_dcxo (void) |
bool | rtc_gpio_init (void) |
u16 | rtc_get_frequency_meter (u16 val, u16 measure_src, u16 window_size) |
static bool | rtc_lpd_init (void) |
static bool | rtc_hw_init (void) |
int | rtc_init (int recover) |
void | rtc_bbpu_power_on (void) |
void | poweroff (void) |
static void | dcxo_init (void) |
void | mt6358_dcxo_disable_unused (void) |
void | rtc_boot (void) |
Definition at line 298 of file rtc.c.
References mdelay(), PMIC_RG_DCXO_CW00, PMIC_RG_DCXO_CW07, PMIC_RG_DCXO_CW09, PMIC_RG_DCXO_CW11, PMIC_RG_DCXO_CW13, PMIC_RG_DCXO_CW15, PMIC_RG_DCXO_CW16, PMIC_RG_DCXO_CW21, PMIC_RG_DCXO_ELR0, PMIC_RG_TOP_TMA_KEY, rtc_write(), and udelay().
Referenced by rtc_boot().
Definition at line 326 of file rtc.c.
References PMIC_RG_DCXO_CW00_CLR, PMIC_RG_DCXO_CW23, and rtc_write().
Referenced by soc_init().
Definition at line 284 of file rtc.c.
References acpi_write32(), ENV_SMM, halt(), MMIO_ACPI_PM1_CNT_BLK, pmic_set_power_hold(), RTC_BBPU, RTC_BBPU_KEY, RTC_BBPU_PWREN, RTC_BBPU_RELOAD, rtc_info, rtc_write(), rtc_writeif_unlock(), SLP_EN, SLP_TYP_S5, and SLP_TYP_SHIFT.
Referenced by chromeec_process_one_event().
Definition at line 266 of file rtc.c.
References pmic_set_power_hold(), RTC_BBPU, RTC_BBPU_AUTO, RTC_BBPU_KEY, RTC_BBPU_PWREN, RTC_BBPU_RELOAD, rtc_info, rtc_read(), rtc_write(), and rtc_write_trigger().
Referenced by rtc_boot().
Definition at line 335 of file rtc.c.
References dcxo_init(), PMIC_RG_DCXO_CW02, PMIC_RG_SCK_TOP_CON0, pwrap_write_field(), rtc_bbpu_power_on(), rtc_boot_common(), rtc_enable_dcxo(), and rtc_info.
Definition at line 12 of file rtc.c.
References mdelay(), RTC_AL_SEC, RTC_BBPU, RTC_BBPU_KEY, RTC_BBPU_RELOAD, RTC_CON, RTC_EMB_K_EOSC32_MODE, RTC_EMBCK_SEL_MODE_MASK, RTC_EMBCK_SEL_OPTION, RTC_EMBCK_SRC_SEL, RTC_GPS_CKOUT_EN, rtc_info, RTC_OSC32CON, rtc_read(), RTC_REG_XOSC32_ENB, rtc_write(), rtc_write_trigger(), rtc_writeif_unlock(), RTC_XOSC32_ENB, and rtc_xosc_write().
Referenced by rtc_boot().
Definition at line 68 of file rtc.c.
References FQMTR_TIMEOUT_US, PMIC_FQMTR_CON0_BUSY, PMIC_FQMTR_CON0_DCXO26M_EN, PMIC_FQMTR_CON0_FQMTR_EN, PMIC_FQMTR_RST_SHIFT, PMIC_RG_FQMTR_32K_CK_PDN_SHIFT, PMIC_RG_FQMTR_CK_PDN_SHIFT, PMIC_RG_FQMTR_CON0, PMIC_RG_FQMTR_DATA, PMIC_RG_FQMTR_RST, PMIC_RG_FQMTR_WINSET, PMIC_RG_TOP_CKPDN_CON0_CLR, PMIC_RG_TOP_CKPDN_CON0_SET, pwrap_write_field(), RTC_BBPU, RTC_BBPU_KEY, RTC_BBPU_RELOAD, rtc_info, RTC_OSC32CON, rtc_read(), rtc_write(), rtc_write_trigger(), rtc_xosc_write(), RTC_XOSCCALI_MASK, stopwatch_expired(), stopwatch_init_usecs_expire(), udelay(), and val.
Definition at line 45 of file rtc.c.
References PMIC_RG_TOP_CKPDN_CON1_CLR, PMIC_RG_TOP_CKSEL_CON0_SET, pwrap_write_field(), RTC_CON, RTC_CON_EOSC32_LPEN, RTC_CON_F32KOB, RTC_CON_GOE, RTC_CON_GPEN, RTC_CON_LPRST, RTC_CON_LPSTA_RAW, RTC_CON_XOSC32_LPEN, rtc_read(), rtc_write(), and rtc_write_trigger().
Referenced by rtc_init().
Definition at line 182 of file rtc.c.
References RTC_BBPU, RTC_BBPU_INIT, RTC_BBPU_KEY, RTC_BBPU_RELOAD, rtc_info, rtc_read(), rtc_write(), rtc_write_trigger(), and udelay().
Referenced by rtc_init().
int rtc_init | ( | int | recover | ) |
Definition at line 206 of file rtc.c.
References mdelay(), rtc_gpio_init(), rtc_hw_init(), rtc_info, rtc_lpd_init(), rtc_osc_init(), rtc_powerkey_init(), rtc_reg_init(), RTC_STATUS_GPIO_INIT_FAIL, RTC_STATUS_HW_INIT_FAIL, RTC_STATUS_LPD_INIT_FAIL, RTC_STATUS_OK, RTC_STATUS_POWERKEY_INIT_FAIL, RTC_STATUS_REG_INIT_FAIL, RTC_STATUS_WRITEIF_UNLOCK_FAIL, and rtc_writeif_unlock().
Definition at line 144 of file rtc.c.
References RTC_AL_SEC, RTC_CON, RTC_CON_EOSC32_LPEN, RTC_CON_XOSC32_LPEN, RTC_LPD_OPT_EOSC_LPD, RTC_LPD_OPT_F32K_CK_ALIVE, RTC_LPD_OPT_MASK, rtc_lpen(), rtc_read(), rtc_write(), and rtc_write_trigger().
Referenced by rtc_init().