diff options
author | Xunlei Pang <pang.xunlei@linaro.org> | 2015-04-01 23:34:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-04-03 02:18:23 -0400 |
commit | cb850717b076d979058d52529e15f1736359d811 (patch) | |
tree | a2780af9ecf4a770aacf4c72b3efa268536c02a3 /drivers/clocksource/tegra20_timer.c | |
parent | a0c2998f918e7e597d3c686c5f3d5a30d0382dd6 (diff) |
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 <pang.xunlei@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com> (for tegra part)
Cc: Russell King <rmk@dyn-67.arm.linux.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1427945681-29972-7-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/clocksource/tegra20_timer.c')
-rw-r--r-- | drivers/clocksource/tegra20_timer.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c index 4a0a603edecc..5a112d72fc2d 100644 --- a/drivers/clocksource/tegra20_timer.c +++ b/drivers/clocksource/tegra20_timer.c | |||
@@ -141,14 +141,6 @@ static void tegra_read_persistent_clock64(struct timespec64 *ts) | |||
141 | *ts = persistent_ts; | 141 | *ts = persistent_ts; |
142 | } | 142 | } |
143 | 143 | ||
144 | static void tegra_read_persistent_clock(struct timespec *ts) | ||
145 | { | ||
146 | struct timespec ts64; | ||
147 | |||
148 | tegra_read_persistent_clock64(&ts64); | ||
149 | *ts = timespec64_to_timespec(ts64); | ||
150 | } | ||
151 | |||
152 | static unsigned long tegra_delay_timer_read_counter_long(void) | 144 | static unsigned long tegra_delay_timer_read_counter_long(void) |
153 | { | 145 | { |
154 | return readl(timer_reg_base + TIMERUS_CNTR_1US); | 146 | return readl(timer_reg_base + TIMERUS_CNTR_1US); |
@@ -259,7 +251,7 @@ static void __init tegra20_init_rtc(struct device_node *np) | |||
259 | else | 251 | else |
260 | clk_prepare_enable(clk); | 252 | clk_prepare_enable(clk); |
261 | 253 | ||
262 | register_persistent_clock(NULL, tegra_read_persistent_clock); | 254 | register_persistent_clock(NULL, tegra_read_persistent_clock64); |
263 | } | 255 | } |
264 | CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc); | 256 | CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc); |
265 | 257 | ||