mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 07:00:42 -04:00
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>
This commit is contained in:
committed by
Alexandre Belloni
parent
1932db202c
commit
2724fb4d42
@@ -345,7 +345,10 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
|
||||
&xrtcdev->freq);
|
||||
if (ret)
|
||||
xrtcdev->freq = RTC_CALIB_DEF;
|
||||
} else {
|
||||
xrtcdev->freq--;
|
||||
}
|
||||
|
||||
ret = readl(xrtcdev->reg_base + RTC_CALIB_RD);
|
||||
if (!ret)
|
||||
writel(xrtcdev->freq, (xrtcdev->reg_base + RTC_CALIB_WR));
|
||||
|
||||
Reference in New Issue
Block a user