+17
−10
Loading
read_offset() was using static frequency for determining the tick offset. It was also using remainder from do_div() operation as tick_mult value which caused the offset to be incorrect. At the same time, rework function to improve readability. It is worth noting, that due to rounding errors, the offset readback will differ slightly for positive and negative calibration values. Reviewed-by:Harini T <harini.t@amd.com> Tested-by:
Harini T <harini.t@amd.com> Signed-off-by:
Tomas Melin <tomas.melin@vaisala.com> Acked-by:
Michal Simek <michal.simek@amd.com> Link: https://patch.msgid.link/20260122-zynqmp-rtc-updates-v4-3-d4edb966b499@vaisala.com Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com>