diff options
author | Mark Salter <msalter@redhat.com> | 2010-10-27 12:28:57 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2010-10-27 12:28:57 -0400 |
commit | 730c1fad0ee22a170d2ee76a904709ee304931c0 (patch) | |
tree | 365289c84b02c5c54d43238f2bc9b14b143cafbc /arch/mn10300/include/asm | |
parent | 2502c64eeb125c5d57e3e7dc38320b500d69e088 (diff) |
MN10300: Generic time support
Implement generic time support for MN10300.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/include/asm')
-rw-r--r-- | arch/mn10300/include/asm/timex.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/mn10300/include/asm/timex.h b/arch/mn10300/include/asm/timex.h index ce5719a2ce7c..bd4e90dfe6c2 100644 --- a/arch/mn10300/include/asm/timex.h +++ b/arch/mn10300/include/asm/timex.h | |||
@@ -18,15 +18,28 @@ | |||
18 | 18 | ||
19 | #define CLOCK_TICK_RATE MN10300_JCCLK /* Underlying HZ */ | 19 | #define CLOCK_TICK_RATE MN10300_JCCLK /* Underlying HZ */ |
20 | 20 | ||
21 | extern cycles_t cacheflush_time; | ||
22 | |||
23 | #ifdef __KERNEL__ | 21 | #ifdef __KERNEL__ |
24 | 22 | ||
23 | extern cycles_t cacheflush_time; | ||
24 | |||
25 | static inline cycles_t get_cycles(void) | 25 | static inline cycles_t get_cycles(void) |
26 | { | 26 | { |
27 | return read_timestamp_counter(); | 27 | return read_timestamp_counter(); |
28 | } | 28 | } |
29 | 29 | ||
30 | extern int init_clockevents(void); | ||
31 | extern int init_clocksource(void); | ||
32 | |||
33 | static inline void setup_jiffies_interrupt(int irq, | ||
34 | struct irqaction *action) | ||
35 | { | ||
36 | u16 tmp; | ||
37 | setup_irq(irq, action); | ||
38 | set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); | ||
39 | GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; | ||
40 | tmp = GxICR(irq); | ||
41 | } | ||
42 | |||
30 | #endif /* __KERNEL__ */ | 43 | #endif /* __KERNEL__ */ |
31 | 44 | ||
32 | #endif /* _ASM_TIMEX_H */ | 45 | #endif /* _ASM_TIMEX_H */ |