diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-08-21 08:59:23 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-08-21 08:59:23 -0400 |
commit | cfb6d656d569510ac9239583ce09e4c92ad54719 (patch) | |
tree | f80d4526a5a293d69a0262b04890ba296c8874ab /arch/arm | |
parent | fac778a2b8d6ca953d440baeee72901c2dd5aad9 (diff) | |
parent | 220069945b298d3998c6598b081c466dca259929 (diff) |
Merge branch 'timers/clockevents-next' of git://git.linaro.org/people/dlezcano/clockevents into timers/core
* Support for memory mapped arch_timers
* Trivial fixes to the moxart timer code
* Documentation updates
Trivial conflicts in drivers/clocksource/arm_arch_timer.c. Fixed up
the newly added __cpuinit annotations as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/arch_timer.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index e406d575c94f..5665134bfa3e 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h | |||
@@ -17,7 +17,8 @@ int arch_timer_arch_init(void); | |||
17 | * nicely work out which register we want, and chuck away the rest of | 17 | * nicely work out which register we want, and chuck away the rest of |
18 | * the code. At least it does so with a recent GCC (4.6.3). | 18 | * the code. At least it does so with a recent GCC (4.6.3). |
19 | */ | 19 | */ |
20 | static inline void arch_timer_reg_write(const int access, const int reg, u32 val) | 20 | static __always_inline |
21 | void arch_timer_reg_write_cp15(int access, enum arch_timer_reg reg, u32 val) | ||
21 | { | 22 | { |
22 | if (access == ARCH_TIMER_PHYS_ACCESS) { | 23 | if (access == ARCH_TIMER_PHYS_ACCESS) { |
23 | switch (reg) { | 24 | switch (reg) { |
@@ -28,9 +29,7 @@ static inline void arch_timer_reg_write(const int access, const int reg, u32 val | |||
28 | asm volatile("mcr p15, 0, %0, c14, c2, 0" : : "r" (val)); | 29 | asm volatile("mcr p15, 0, %0, c14, c2, 0" : : "r" (val)); |
29 | break; | 30 | break; |
30 | } | 31 | } |
31 | } | 32 | } else if (access == ARCH_TIMER_VIRT_ACCESS) { |
32 | |||
33 | if (access == ARCH_TIMER_VIRT_ACCESS) { | ||
34 | switch (reg) { | 33 | switch (reg) { |
35 | case ARCH_TIMER_REG_CTRL: | 34 | case ARCH_TIMER_REG_CTRL: |
36 | asm volatile("mcr p15, 0, %0, c14, c3, 1" : : "r" (val)); | 35 | asm volatile("mcr p15, 0, %0, c14, c3, 1" : : "r" (val)); |
@@ -44,7 +43,8 @@ static inline void arch_timer_reg_write(const int access, const int reg, u32 val | |||
44 | isb(); | 43 | isb(); |
45 | } | 44 | } |
46 | 45 | ||
47 | static inline u32 arch_timer_reg_read(const int access, const int reg) | 46 | static __always_inline |
47 | u32 arch_timer_reg_read_cp15(int access, enum arch_timer_reg reg) | ||
48 | { | 48 | { |
49 | u32 val = 0; | 49 | u32 val = 0; |
50 | 50 | ||
@@ -57,9 +57,7 @@ static inline u32 arch_timer_reg_read(const int access, const int reg) | |||
57 | asm volatile("mrc p15, 0, %0, c14, c2, 0" : "=r" (val)); | 57 | asm volatile("mrc p15, 0, %0, c14, c2, 0" : "=r" (val)); |
58 | break; | 58 | break; |
59 | } | 59 | } |
60 | } | 60 | } else if (access == ARCH_TIMER_VIRT_ACCESS) { |
61 | |||
62 | if (access == ARCH_TIMER_VIRT_ACCESS) { | ||
63 | switch (reg) { | 61 | switch (reg) { |
64 | case ARCH_TIMER_REG_CTRL: | 62 | case ARCH_TIMER_REG_CTRL: |
65 | asm volatile("mrc p15, 0, %0, c14, c3, 1" : "=r" (val)); | 63 | asm volatile("mrc p15, 0, %0, c14, c3, 1" : "=r" (val)); |