aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/include/asm
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2010-10-27 12:28:57 -0400
committerDavid Howells <dhowells@redhat.com>2010-10-27 12:28:57 -0400
commit730c1fad0ee22a170d2ee76a904709ee304931c0 (patch)
tree365289c84b02c5c54d43238f2bc9b14b143cafbc /arch/mn10300/include/asm
parent2502c64eeb125c5d57e3e7dc38320b500d69e088 (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.h17
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
21extern cycles_t cacheflush_time;
22
23#ifdef __KERNEL__ 21#ifdef __KERNEL__
24 22
23extern cycles_t cacheflush_time;
24
25static inline cycles_t get_cycles(void) 25static inline cycles_t get_cycles(void)
26{ 26{
27 return read_timestamp_counter(); 27 return read_timestamp_counter();
28} 28}
29 29
30extern int init_clockevents(void);
31extern int init_clocksource(void);
32
33static 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 */