int (*init)(void);
int (*start)(void);
int (*stop)(void);
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
- unsigned long (*get_offset)(void);
-#endif
};
struct sys_timer {
extern struct sys_timer tmu_timer;
extern struct sys_timer *sys_timer;
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
-static inline unsigned long get_timer_offset(void)
-{
- return sys_timer->ops->get_offset();
-}
-#endif
-
/* arch/sh/kernel/timers/timer.c */
struct sys_timer *get_sys_timer(void);
}
module_init(rtc_generic_init);
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
-u32 arch_gettimeoffset(void)
-{
- return get_timer_offset() * 1000;
-}
-#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
-
/* last time the RTC clock got updated */
static long last_rtc_update;
.name = "SuperH",
};
-#ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
unsigned long long sched_clock(void)
{
unsigned long long cycles;
cycles = clocksource_sh.read(&clocksource_sh);
return cyc2ns(&clocksource_sh, cycles);
}
-#endif
static void __init sh_late_time_init(void)
{