|
@@ -153,32 +153,6 @@ static inline unsigned long omap_32k_sync_timer_read(void)
|
|
return omap_readl(TIMER_32K_SYNCHRONIZED);
|
|
return omap_readl(TIMER_32K_SYNCHRONIZED);
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * Rounds down to nearest usec. Note that this will overflow for larger values.
|
|
|
|
- */
|
|
|
|
-static inline unsigned long omap_32k_ticks_to_usecs(unsigned long ticks_32k)
|
|
|
|
-{
|
|
|
|
- return (ticks_32k * 5*5*5*5*5*5) >> 9;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * Rounds down to nearest nsec.
|
|
|
|
- */
|
|
|
|
-static inline unsigned long long
|
|
|
|
-omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
|
|
|
|
-{
|
|
|
|
- return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * Returns current time from boot in nsecs. It's OK for this to wrap
|
|
|
|
- * around for now, as it's just a relative time stamp.
|
|
|
|
- */
|
|
|
|
-unsigned long long sched_clock(void)
|
|
|
|
-{
|
|
|
|
- return omap_32k_ticks_to_nsecs(omap_32k_sync_timer_read());
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
|
|
static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
|
|
{
|
|
{
|
|
struct clock_event_device *evt = &clockevent_32k_timer;
|
|
struct clock_event_device *evt = &clockevent_32k_timer;
|