Lines Matching full:rtc
165 * RTC only with DDR in self-refresh mode magic value, checked against during
171 /* Board type field bit shift for RTC only with DDR in self-refresh mode */
324 static void rtc32k_unlock(struct davinci_rtc *rtc) in rtc32k_unlock() argument
327 * Unlock the RTC's registers. For more details please see the in rtc32k_unlock()
331 writel(RTC_KICK0R_WE, &rtc->kick0r); in rtc32k_unlock()
332 writel(RTC_KICK1R_WE, &rtc->kick1r); in rtc32k_unlock()
351 struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; in update_rtc_magic() local
356 rtc32k_unlock(rtc); in update_rtc_magic()
359 writel(magic, &rtc->scratch1); in update_rtc_magic()
389 struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; in rtc32k_enable() local
391 rtc32k_unlock(rtc); in rtc32k_enable()
393 /* Enable the RTC 32K OSC by setting bits 3 and 6. */ in rtc32k_enable()
394 writel((1 << 3) | (1 << 6), &rtc->osc); in rtc32k_enable()
430 * Check if we are executing rtc-only + DDR mode, and resume from it if needed
434 struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; in rtc_only() local
441 scratch1 = readl(&rtc->scratch1); in rtc_only()
444 * Check RTC scratch against RTC_MAGIC_VAL, RTC_MAGIC_VAL is only in rtc_only()
445 * written to this register when we want to wake up from RTC only in rtc_only()
453 rtc32k_unlock(rtc); in rtc_only()
455 /* Clear RTC magic */ in rtc_only()
456 writel(0, &rtc->scratch1); in rtc_only()
479 resume_func = (void *)readl(&rtc->scratch0); in rtc_only()