diff options
author | Mark Rutland <mark.rutland@arm.com> | 2012-11-12 15:33:44 +0100 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2013-01-31 16:51:49 +0100 |
commit | 8a4da6e36c582ff746191eca85b6c1c068dbfbd6 (patch) | |
tree | 9c4be7e6853d33f35580e6f7c64c3d410dfe4aaf /arch/arm/include/asm/arch_timer.h | |
parent | arm: arch_timer: add arch_counter_set_user_access (diff) | |
download | linux-8a4da6e36c582ff746191eca85b6c1c068dbfbd6.tar.xz linux-8a4da6e36c582ff746191eca85b6c1c068dbfbd6.zip |
arm: arch_timer: move core to drivers/clocksource
The core functionality of the arch_timer driver is not directly tied to
anything under arch/arm, and can be split out.
This patch factors out the core of the arch_timer driver, so it can be
shared with other architectures. A couple of functions are added so
that architecture-specific code can interact with the driver without
needing to touch its internals.
The ARM_ARCH_TIMER config variable is moved out to
drivers/clocksource/Kconfig, existing uses in arch/arm are replaced with
HAVE_ARM_ARCH_TIMER, which selects it.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/asm/arch_timer.h')
-rw-r--r-- | arch/arm/include/asm/arch_timer.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 729f6d98df86..7ade91d8cc6f 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h @@ -4,22 +4,14 @@ #include <asm/barrier.h> #include <asm/errno.h> #include <linux/clocksource.h> +#include <linux/init.h> #include <linux/types.h> +#include <clocksource/arm_arch_timer.h> + #ifdef CONFIG_ARM_ARCH_TIMER int arch_timer_of_register(void); int arch_timer_sched_clock_init(void); -struct timecounter *arch_timer_get_timecounter(void); - -#define ARCH_TIMER_CTRL_ENABLE (1 << 0) -#define ARCH_TIMER_CTRL_IT_MASK (1 << 1) -#define ARCH_TIMER_CTRL_IT_STAT (1 << 2) - -#define ARCH_TIMER_REG_CTRL 0 -#define ARCH_TIMER_REG_TVAL 1 - -#define ARCH_TIMER_PHYS_ACCESS 0 -#define ARCH_TIMER_VIRT_ACCESS 1 /* * These register accessors are marked inline so the compiler can @@ -128,11 +120,6 @@ static inline int arch_timer_sched_clock_init(void) { return -ENXIO; } - -static inline struct timecounter *arch_timer_get_timecounter(void) -{ - return NULL; -} #endif #endif |