aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r--arch/arm/kernel/time.c53
1 files changed, 1 insertions, 52 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 09be0c3c9069..955d92d265e5 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -21,7 +21,6 @@
21#include <linux/timex.h> 21#include <linux/timex.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/profile.h> 23#include <linux/profile.h>
24#include <linux/syscore_ops.h>
25#include <linux/timer.h> 24#include <linux/timer.h>
26#include <linux/irq.h> 25#include <linux/irq.h>
27 26
@@ -31,11 +30,6 @@
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32#include <asm/mach/time.h> 31#include <asm/mach/time.h>
33 32
34/*
35 * Our system timer.
36 */
37static struct sys_timer *system_timer;
38
39#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ 33#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
40 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) 34 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
41/* this needs a better home */ 35/* this needs a better home */
@@ -69,16 +63,6 @@ unsigned long profile_pc(struct pt_regs *regs)
69EXPORT_SYMBOL(profile_pc); 63EXPORT_SYMBOL(profile_pc);
70#endif 64#endif
71 65
72#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
73u32 arch_gettimeoffset(void)
74{
75 if (system_timer->offset != NULL)
76 return system_timer->offset() * 1000;
77
78 return 0;
79}
80#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
81
82#ifndef CONFIG_GENERIC_CLOCKEVENTS 66#ifndef CONFIG_GENERIC_CLOCKEVENTS
83/* 67/*
84 * Kernel system timer support. 68 * Kernel system timer support.
@@ -129,43 +113,8 @@ int __init register_persistent_clock(clock_access_fn read_boot,
129 return -EINVAL; 113 return -EINVAL;
130} 114}
131 115
132#if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS)
133static int timer_suspend(void)
134{
135 if (system_timer->suspend)
136 system_timer->suspend();
137
138 return 0;
139}
140
141static void timer_resume(void)
142{
143 if (system_timer->resume)
144 system_timer->resume();
145}
146#else
147#define timer_suspend NULL
148#define timer_resume NULL
149#endif
150
151static struct syscore_ops timer_syscore_ops = {
152 .suspend = timer_suspend,
153 .resume = timer_resume,
154};
155
156static int __init timer_init_syscore_ops(void)
157{
158 register_syscore_ops(&timer_syscore_ops);
159
160 return 0;
161}
162
163device_initcall(timer_init_syscore_ops);
164
165void __init time_init(void) 116void __init time_init(void)
166{ 117{
167 system_timer = machine_desc->timer; 118 machine_desc->init_time();
168 system_timer->init();
169 sched_clock_postinit(); 119 sched_clock_postinit();
170} 120}
171