Marc Zyngier | f5b3b2b | 2011-11-07 14:28:33 -0800 | [diff] [blame] | 1 | #ifndef __ASMARM_ARCH_TIMER_H |
2 | #define __ASMARM_ARCH_TIMER_H | ||||
3 | |||||
Marc Zyngier | df590cc | 2012-01-11 17:25:17 +0000 | [diff] [blame] | 4 | #include <linux/ioport.h> |
Jeff Ohlstein | 57808a6 | 2012-07-16 13:39:26 -0700 | [diff] [blame] | 5 | #include <linux/clocksource.h> |
Stephen Boyd | 4d84b3b | 2012-07-26 12:00:03 -0700 | [diff] [blame] | 6 | #include <asm/errno.h> |
Marc Zyngier | f5b3b2b | 2011-11-07 14:28:33 -0800 | [diff] [blame] | 7 | |
Marc Zyngier | df590cc | 2012-01-11 17:25:17 +0000 | [diff] [blame] | 8 | struct arch_timer { |
Abhimanyu Kapur | 05b6644 | 2012-05-31 23:28:23 -0700 | [diff] [blame] | 9 | struct resource res[3]; |
Marc Zyngier | df590cc | 2012-01-11 17:25:17 +0000 | [diff] [blame] | 10 | }; |
11 | |||||
12 | #ifdef CONFIG_ARM_ARCH_TIMER | ||||
13 | int arch_timer_register(struct arch_timer *); | ||||
Sathish Ambley | 2f27a17 | 2012-03-16 10:46:28 -0700 | [diff] [blame] | 14 | int arch_timer_of_register(void); |
Jeff Ohlstein | 57808a6 | 2012-07-16 13:39:26 -0700 | [diff] [blame] | 15 | cycle_t arch_counter_get_cntpct(void); |
Marc Zyngier | df590cc | 2012-01-11 17:25:17 +0000 | [diff] [blame] | 16 | #else |
17 | static inline int arch_timer_register(struct arch_timer *at) | ||||
18 | { | ||||
19 | return -ENXIO; | ||||
20 | } | ||||
Sathish Ambley | 2f27a17 | 2012-03-16 10:46:28 -0700 | [diff] [blame] | 21 | |
22 | static inline int arch_timer_of_register(void) | ||||
23 | { | ||||
24 | return -ENXIO; | ||||
25 | } | ||||
Jeff Ohlstein | 57808a6 | 2012-07-16 13:39:26 -0700 | [diff] [blame] | 26 | |
27 | static inline cycle_t arch_counter_get_cntpct(void) | ||||
28 | { | ||||
29 | return 0; | ||||
30 | } | ||||
Marc Zyngier | df590cc | 2012-01-11 17:25:17 +0000 | [diff] [blame] | 31 | #endif |
Marc Zyngier | f5b3b2b | 2011-11-07 14:28:33 -0800 | [diff] [blame] | 32 | |
33 | #endif |