Skip to content

Commit 2724fb4

Browse files
vai-tommealexandrebelloni
authored andcommitted
rtc: zynqmp: correct frequency value
Fix calibration value in case a clock reference is provided. The actual calibration value written into register is frequency - 1. 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-1-d4edb966b499@vaisala.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 1932db2 commit 2724fb4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/rtc/rtc-zynqmp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
345345
&xrtcdev->freq);
346346
if (ret)
347347
xrtcdev->freq = RTC_CALIB_DEF;
348+
} else {
349+
xrtcdev->freq--;
348350
}
351+
349352
ret = readl(xrtcdev->reg_base + RTC_CALIB_RD);
350353
if (!ret)
351354
writel(xrtcdev->freq, (xrtcdev->reg_base + RTC_CALIB_WR));

0 commit comments

Comments
 (0)