Lines Matching refs:offset
98 static uint32_t atmel_rtc_read(unsigned int offset) in atmel_rtc_read() argument
100 return io_read32(rtc_base + offset); in atmel_rtc_read()
103 static void atmel_rtc_write(unsigned int offset, uint32_t val) in atmel_rtc_write() argument
105 return io_write32(rtc_base + offset, val); in atmel_rtc_write()
200 static TEE_Result atmel_rtc_get_offset(struct rtc *rtc __unused, long *offset) in atmel_rtc_get_offset() argument
206 *offset = 0; in atmel_rtc_get_offset()
220 *offset = val; in atmel_rtc_get_offset()
225 static TEE_Result atmel_rtc_set_offset(struct rtc *rtc __unused, long offset) in atmel_rtc_set_offset() argument
230 if (offset > ATMEL_RTC_CORR_DIVIDEND / 2) in atmel_rtc_set_offset()
232 if (offset < -ATMEL_RTC_CORR_DIVIDEND / 2) in atmel_rtc_set_offset()
238 if (offset > 0) in atmel_rtc_set_offset()
241 offset = -offset; in atmel_rtc_set_offset()
244 if (offset < 764) { in atmel_rtc_set_offset()
254 if (offset < 29208) { in atmel_rtc_set_offset()
256 offset * ATMEL_RTC_CORR_LOW_RATIO); in atmel_rtc_set_offset()
258 corr = UDIV_ROUND_NEAREST(ATMEL_RTC_CORR_DIVIDEND, offset); in atmel_rtc_set_offset()