mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ARM, clocksource/drivers: Provide read_boot_clock64() and read_persistent_clock64() and use them
As part of addressing "y2038 problem" for in-kernel uses, this patch converts read_boot_clock() to read_boot_clock64() and read_persistent_clock() to read_persistent_clock64() using timespec64 by converting clock_access_fn to use timespec64. Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: John Stultz <[email protected]> Acked-by: Thierry Reding <[email protected]> (for tegra part) Cc: Russell King <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
a0c2998f91
commit
cb850717b0
4 changed files with 6 additions and 23 deletions
|
|
@ -141,14 +141,6 @@ static void tegra_read_persistent_clock64(struct timespec64 *ts)
|
|||
*ts = persistent_ts;
|
||||
}
|
||||
|
||||
static void tegra_read_persistent_clock(struct timespec *ts)
|
||||
{
|
||||
struct timespec ts64;
|
||||
|
||||
tegra_read_persistent_clock64(&ts64);
|
||||
*ts = timespec64_to_timespec(ts64);
|
||||
}
|
||||
|
||||
static unsigned long tegra_delay_timer_read_counter_long(void)
|
||||
{
|
||||
return readl(timer_reg_base + TIMERUS_CNTR_1US);
|
||||
|
|
@ -259,7 +251,7 @@ static void __init tegra20_init_rtc(struct device_node *np)
|
|||
else
|
||||
clk_prepare_enable(clk);
|
||||
|
||||
register_persistent_clock(NULL, tegra_read_persistent_clock);
|
||||
register_persistent_clock(NULL, tegra_read_persistent_clock64);
|
||||
}
|
||||
CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue