diff options
author | Olof Johansson <olof@lixom.net> | 2013-04-17 13:10:01 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-04-17 13:10:01 -0400 |
commit | c3e0c873d0653e6e7628b5a8a9fcb3745444ca9e (patch) | |
tree | dd7448d5515c56604cd8e57f3d6399f5640d57a3 /arch/arm64 | |
parent | 228e3023eb0430b4b9ed0736f8f87c96a6cd9c7a (diff) | |
parent | 69a517b2471bcd1c5a175aad82647c1e2c24f08b (diff) |
Merge tag 'clksrc-cleanup-for-3.10-part2' of git://sources.calxeda.com/kernel/linux into late/clksrc
This is the 2nd part of ARM timer clean-ups for 3.10. This series has
the following changes:
- Add sched_clock selection logic to select the highest frequency clock
- Use full 64-bit arch timer counter for sched_clock
- Convert arch timer, sp804 and integrator-cp timers to CLKSRC_OF and
adapt all users to use clocksource_of_init
* tag 'clksrc-cleanup-for-3.10-part2' of git://sources.calxeda.com/kernel/linux:
devtree: add binding documentation for sp804
ARM: integrator-cp: convert use CLKSRC_OF for timer init
ARM: versatile: use OF init for sp804 timer
ARM: versatile: add versatile dtbs to dtbs target
ARM: vexpress: remove extra timer-sp control register clearing
ARM: dts: vexpress: disable CA9 core tile sp804 timer
ARM: vexpress: remove sp804 OF init
ARM: highbank: use OF init for sp804 timer
ARM: timer-sp: convert to use CLKSRC_OF init
OF: add empty of_device_is_available for !OF
ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
ARM: make machine_desc->init_time default to clocksource_of_init
ARM: arch_timer: use full 64-bit counter for sched_clock
ARM: make sched_clock just call a function pointer
ARM: sched_clock: allow changing to higher frequency counter
Signed-off-by: Olof Johansson <olof@lixom.net>
This has a nasty set of conflicts with the exynos MCT code, which was
moved in a separate branch, and then fixed up when merged in, but still
conflicts a bit here. It should have been sorted out by this merge though.
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/arch_timer.h | 5 | ||||
-rw-r--r-- | arch/arm64/kernel/time.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h index 91e2a6a6fcd4..bf6ab242f047 100644 --- a/arch/arm64/include/asm/arch_timer.h +++ b/arch/arm64/include/asm/arch_timer.h | |||
@@ -130,4 +130,9 @@ static inline u64 arch_counter_get_cntvct(void) | |||
130 | return cval; | 130 | return cval; |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline int arch_timer_arch_init(void) | ||
134 | { | ||
135 | return 0; | ||
136 | } | ||
137 | |||
133 | #endif | 138 | #endif |
diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c index b0ef18d14c3b..a551f88ae2c1 100644 --- a/arch/arm64/kernel/time.c +++ b/arch/arm64/kernel/time.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/clocksource.h> | ||
35 | 36 | ||
36 | #include <clocksource/arm_arch_timer.h> | 37 | #include <clocksource/arm_arch_timer.h> |
37 | 38 | ||
@@ -77,10 +78,11 @@ void __init time_init(void) | |||
77 | { | 78 | { |
78 | u32 arch_timer_rate; | 79 | u32 arch_timer_rate; |
79 | 80 | ||
80 | if (arch_timer_init()) | 81 | clocksource_of_init(); |
81 | panic("Unable to initialise architected timer.\n"); | ||
82 | 82 | ||
83 | arch_timer_rate = arch_timer_get_rate(); | 83 | arch_timer_rate = arch_timer_get_rate(); |
84 | if (!arch_timer_rate) | ||
85 | panic("Unable to initialise architected timer.\n"); | ||
84 | 86 | ||
85 | /* Cache the sched_clock multiplier to save a divide in the hot path. */ | 87 | /* Cache the sched_clock multiplier to save a divide in the hot path. */ |
86 | sched_clock_mult = NSEC_PER_SEC / arch_timer_rate; | 88 | sched_clock_mult = NSEC_PER_SEC / arch_timer_rate; |