diff options
Diffstat (limited to 'arch/sh/include/asm/timex.h')
-rw-r--r-- | arch/sh/include/asm/timex.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sh/include/asm/timex.h b/arch/sh/include/asm/timex.h index 18bf06d9c76..5249bee819c 100644 --- a/arch/sh/include/asm/timex.h +++ b/arch/sh/include/asm/timex.h @@ -12,6 +12,8 @@ * can be used for accurately setting CLOCK_TICK_RATE, otherwise we * simply fall back on the i8253 PIT value. */ + +#if 0 #ifdef CONFIG_SH_PCLK_FREQ #define CLOCK_TICK_RATE (CONFIG_SH_PCLK_FREQ / 4) /* Underlying HZ */ #else @@ -19,5 +21,18 @@ #endif #include <asm-generic/timex.h> +#endif //0 + +#include <linux/io.h> +#include <cpu/timer.h> + +#define CLOCK_TICK_RATE (HZ * 100000UL) + +typedef unsigned long long cycles_t; + +static __inline__ cycles_t get_cycles (void) +{ + return 0xffffffff - ctrl_inl(TMU1_TCNT); +} #endif /* __ASM_SH_TIMEX_H */ |