diff options
Diffstat (limited to 'arch/arm/plat-omap/timer32k.c')
-rw-r--r-- | arch/arm/plat-omap/timer32k.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index ce034dc59d4..1f7365f5df2 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c | |||
@@ -153,32 +153,6 @@ static inline unsigned long omap_32k_sync_timer_read(void) | |||
153 | return omap_readl(TIMER_32K_SYNCHRONIZED); | 153 | return omap_readl(TIMER_32K_SYNCHRONIZED); |
154 | } | 154 | } |
155 | 155 | ||
156 | /* | ||
157 | * Rounds down to nearest usec. Note that this will overflow for larger values. | ||
158 | */ | ||
159 | static inline unsigned long omap_32k_ticks_to_usecs(unsigned long ticks_32k) | ||
160 | { | ||
161 | return (ticks_32k * 5*5*5*5*5*5) >> 9; | ||
162 | } | ||
163 | |||
164 | /* | ||
165 | * Rounds down to nearest nsec. | ||
166 | */ | ||
167 | static inline unsigned long long | ||
168 | omap_32k_ticks_to_nsecs(unsigned long ticks_32k) | ||
169 | { | ||
170 | return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9; | ||
171 | } | ||
172 | |||
173 | /* | ||
174 | * Returns current time from boot in nsecs. It's OK for this to wrap | ||
175 | * around for now, as it's just a relative time stamp. | ||
176 | */ | ||
177 | unsigned long long sched_clock(void) | ||
178 | { | ||
179 | return omap_32k_ticks_to_nsecs(omap_32k_sync_timer_read()); | ||
180 | } | ||
181 | |||
182 | static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) | 156 | static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) |
183 | { | 157 | { |
184 | struct clock_event_device *evt = &clockevent_32k_timer; | 158 | struct clock_event_device *evt = &clockevent_32k_timer; |