mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
Add support for reading RTC clock from device tree using clock framework also update the default calibration value to 0x7FFF as per RTC specifications. Falls back to 'calibration' property if clock unavailable, and uses default calibration if neither is present. Only writes calibration when hardware register reads zero. The calibration write previously in zynqmp_rtc_set() has been moved to the probe function. The earlier implementation wrote calibration on every time update to clear the tick counter, but since calibration is now dynamically configured from clock framework or device tree during probe, it only requires one-time initialization. This avoids repeated tick counter resets and unnecessary overhead. Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20260120110056.3640303-1-pranav.vinaytilak@amd.com