diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-10-04 23:02:26 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-10-04 23:02:26 +0100 |
commit | ceaa1a13c0e53242555fa45887d82339a3f93c78 (patch) | |
tree | 665bebcd325c68a1424a49baf9be52512b2d8aa1 /arch/arm/include | |
parent | ba4a63f89c8f8a014450e45fd96a06a5e078e52f (diff) | |
parent | 56942fec06efa0e17df0f4c3b438332c923b9014 (diff) | |
download | linux-ceaa1a13c0e53242555fa45887d82339a3f93c78.tar.bz2 |
Merge branch 'arch-timers' into for-linus
Conflicts:
arch/arm/include/asm/timex.h
arch/arm/lib/delay.c
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/arch_timer.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/delay.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/timex.h | 6 |
3 files changed, 17 insertions, 6 deletions
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 62e75475e57e..d40229d9a1c9 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h @@ -2,11 +2,12 @@ #define __ASMARM_ARCH_TIMER_H #include <asm/errno.h> +#include <linux/clocksource.h> #ifdef CONFIG_ARM_ARCH_TIMER -#define ARCH_HAS_READ_CURRENT_TIMER int arch_timer_of_register(void); int arch_timer_sched_clock_init(void); +struct timecounter *arch_timer_get_timecounter(void); #else static inline int arch_timer_of_register(void) { @@ -17,6 +18,11 @@ static inline int arch_timer_sched_clock_init(void) { return -ENXIO; } + +static inline struct timecounter *arch_timer_get_timecounter(void) +{ + return NULL; +} #endif #endif diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h index dc6145120de3..ab98fdd083bd 100644 --- a/arch/arm/include/asm/delay.h +++ b/arch/arm/include/asm/delay.h @@ -15,6 +15,11 @@ #ifndef __ASSEMBLY__ +struct delay_timer { + unsigned long (*read_current_timer)(void); + unsigned long freq; +}; + extern struct arm_delay_ops { void (*delay)(unsigned long); void (*const_udelay)(unsigned long); @@ -56,6 +61,10 @@ extern void __loop_delay(unsigned long loops); extern void __loop_udelay(unsigned long usecs); extern void __loop_const_udelay(unsigned long); +/* Delay-loop timer registration. */ +#define ARCH_HAS_READ_CURRENT_TIMER +extern void register_current_timer_delay(const struct delay_timer *timer); + #endif /* __ASSEMBLY__ */ #endif /* defined(_ARM_DELAY_H) */ diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index 5e711722ebf4..9acc135dad94 100644 --- a/arch/arm/include/asm/timex.h +++ b/arch/arm/include/asm/timex.h @@ -12,13 +12,9 @@ #ifndef _ASMARM_TIMEX_H #define _ASMARM_TIMEX_H -#include <asm/arch_timer.h> #include <mach/timex.h> -#ifdef ARCH_HAS_READ_CURRENT_TIMER +typedef unsigned long cycles_t; #define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) -#endif - -#include <asm-generic/timex.h> #endif |