Lines Matching refs:offset
97 static uint32_t atmel_rtc_read(unsigned int offset) in atmel_rtc_read() argument
99 return io_read32(rtc_base + offset); in atmel_rtc_read()
102 static void atmel_rtc_write(unsigned int offset, uint32_t val) in atmel_rtc_write() argument
104 return io_write32(rtc_base + offset, val); in atmel_rtc_write()
199 static TEE_Result atmel_rtc_get_offset(struct rtc *rtc __unused, long *offset) in atmel_rtc_get_offset() argument
205 *offset = 0; in atmel_rtc_get_offset()
219 *offset = val; in atmel_rtc_get_offset()
224 static TEE_Result atmel_rtc_set_offset(struct rtc *rtc __unused, long offset) in atmel_rtc_set_offset() argument
229 if (offset > ATMEL_RTC_CORR_DIVIDEND / 2) in atmel_rtc_set_offset()
231 if (offset < -ATMEL_RTC_CORR_DIVIDEND / 2) in atmel_rtc_set_offset()
237 if (offset > 0) in atmel_rtc_set_offset()
240 offset = -offset; in atmel_rtc_set_offset()
243 if (offset < 764) { in atmel_rtc_set_offset()
253 if (offset < 29208) { in atmel_rtc_set_offset()
255 offset * ATMEL_RTC_CORR_LOW_RATIO); in atmel_rtc_set_offset()
257 corr = UDIV_ROUND_NEAREST(ATMEL_RTC_CORR_DIVIDEND, offset); in atmel_rtc_set_offset()