Home
last modified time | relevance | path

Searched refs:pred_a (Results 1 – 1 of 1) sorted by relevance

/Linux-v4.19/drivers/rtc/
Drtc-stm32.c638 unsigned int prer, pred_a, pred_s, pred_a_max, pred_s_max, cr; in stm32_rtc_init() local
648 for (pred_a = pred_a_max; pred_a + 1 > 0; pred_a--) { in stm32_rtc_init()
649 pred_s = (rate / (pred_a + 1)) - 1; in stm32_rtc_init()
651 if (((pred_s + 1) * (pred_a + 1)) == rate) in stm32_rtc_init()
659 if ((pred_s > pred_s_max) || (pred_a > pred_a_max)) { in stm32_rtc_init()
660 pred_a = pred_a_max; in stm32_rtc_init()
661 pred_s = (rate / (pred_a + 1)) - 1; in stm32_rtc_init()
664 (rate < ((pred_a + 1) * (pred_s + 1))) ? in stm32_rtc_init()
679 prer |= (pred_a << STM32_RTC_PRER_PRED_A_SHIFT) & STM32_RTC_PRER_PRED_A; in stm32_rtc_init()