From 458821452642fd5dc2377b73cd1323fd4a9653e7 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 4 Oct 2006 13:21:45 +0900 Subject: sh: First step at generic timeofday support. At the moment we wrap GENERIC_TIME around our existing timer API. As boards start providing their own clocksources, they're able to select GENERIC_TIME accordingly and optimize out most of the timer API. Once the current timers have been reworked as proper clocksource drivers, the rest of the place holders for the timer API can go away and we can flip on GENERIC_TIME unconditionally. Signed-off-by: Paul Mundt --- include/asm-sh/timer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/asm-sh/timer.h') diff --git a/include/asm-sh/timer.h b/include/asm-sh/timer.h index c7ab28095ba0..ebc78db1a9ea 100644 --- a/include/asm-sh/timer.h +++ b/include/asm-sh/timer.h @@ -8,7 +8,9 @@ struct sys_timer_ops { int (*init)(void); int (*start)(void); int (*stop)(void); +#ifndef CONFIG_GENERIC_TIME unsigned long (*get_offset)(void); +#endif unsigned long (*get_frequency)(void); }; @@ -24,10 +26,12 @@ struct sys_timer { extern struct sys_timer tmu_timer; extern struct sys_timer *sys_timer; +#ifndef CONFIG_GENERIC_TIME static inline unsigned long get_timer_offset(void) { return sys_timer->ops->get_offset(); } +#endif static inline unsigned long get_timer_frequency(void) { -- cgit v1.2.1