37 new = old & ~(
mask << shift);
38 new |= (
val << shift);
46 rtc_info(
"rtc_writeif_unlock() failed\n");
50 u16 bbpu, con, osc32con, sec;
59 rtc_info(
"rtc_xosc_write() failed\n");
66 rtc_info(
"con=%#x, osc32con=%#x, sec=%#x\n", con, osc32con, sec);
90 u16 fqmtr_busy, fqmtr_data, fqmtr_tcksel;
135 rtc_info(
"get frequency time out!\n");
152 rtc_info(
"input=%d, output=%d\n",
val, fqmtr_data);
191 rtc_info(
"check RTC_CON_LPSTA_RAW after LP init: %#x\n", con);
224 rtc_info(
"recovery: %d\n", recover);
281 rtc_info(
"init failed: ret=%d\n", ret);
296 rtc_info(
"rtc_write_trigger=%d\n", ret);
306 rtc_info(
"rtc_writeif_unlock() failed\n");
328 rtc_info(
"rtc_enable_dcxo() failed\n");
void mdelay(unsigned int msecs)
void __noreturn halt(void)
halt the system reliably
static int stopwatch_expired(struct stopwatch *sw)
static void stopwatch_init_usecs_expire(struct stopwatch *sw, long us)
struct pmif * get_pmif_controller(int inf, int mstid)
bool rtc_write_trigger(void)
@ RTC_STATUS_HW_INIT_FAIL
@ RTC_STATUS_LPD_INIT_FAIL
@ RTC_STATUS_REG_INIT_FAIL
@ RTC_STATUS_GPIO_INIT_FAIL
@ RTC_STATUS_WRITEIF_UNLOCK_FAIL
@ RTC_STATUS_POWERKEY_INIT_FAIL
#define rtc_info(fmt, arg ...)
bool rtc_writeif_unlock(void)
void rtc_boot_common(void)
bool rtc_xosc_write(u16 val)
bool rtc_powerkey_init(void)
void rtc_bbpu_power_on(void)
static bool rtc_hw_init(void)
static bool rtc_enable_dcxo(void)
static bool rtc_lpd_init(void)
void rtc_read(u16 addr, u16 *rdata)
static void rtc_write_field(u16 reg, u16 val, u16 mask, u16 shift)
int rtc_init(int recover)
static struct pmif * pmif_arb
u16 rtc_get_frequency_meter(u16 val, u16 measure_src, u16 window_size)
void rtc_write(u16 addr, u16 wdata)
void(* write)(struct pmif *arb, u32 slvid, u32 reg, u32 data)
void(* read)(struct pmif *arb, u32 slvid, u32 reg, u32 *data)