aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2012-11-12 09:40:44 -0500
committerMark Rutland <mark.rutland@arm.com>2013-01-31 10:51:05 -0500
commitef201de430b0deb62a9afd2c4e67f04525cec43c (patch)
treedfb5efcd5f9eaa3f98e6ec41c9758bb5dfb6f256
parent2b55d10c46815d9660c0f1bc6044f7019ff384aa (diff)
arm: arch_timer: remove redundant available check
This check is a holdover from the pre-devicetree days. As the timer is not probed except by platforms which register it via devicetree, it's not strictly necessary. 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>
-rw-r--r--arch/arm/kernel/arch_timer.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index 6dd73c67d864..1bb3b582043c 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -20,11 +20,9 @@
20#include <linux/of_irq.h> 20#include <linux/of_irq.h>
21#include <linux/io.h> 21#include <linux/io.h>
22 22
23#include <asm/cputype.h>
24#include <asm/delay.h> 23#include <asm/delay.h>
25#include <asm/localtimer.h> 24#include <asm/localtimer.h>
26#include <asm/arch_timer.h> 25#include <asm/arch_timer.h>
27#include <asm/system_info.h>
28#include <asm/sched_clock.h> 26#include <asm/sched_clock.h>
29 27
30static unsigned long arch_timer_rate; 28static unsigned long arch_timer_rate;
@@ -259,20 +257,10 @@ static int __cpuinit arch_timer_setup(struct clock_event_device *clk)
259 return 0; 257 return 0;
260} 258}
261 259
262/* Is the optional system timer available? */
263static int local_timer_is_architected(void)
264{
265 return (cpu_architecture() >= CPU_ARCH_ARMv7) &&
266 ((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1;
267}
268
269static int arch_timer_available(void) 260static int arch_timer_available(void)
270{ 261{
271 unsigned long freq; 262 unsigned long freq;
272 263
273 if (!local_timer_is_architected())
274 return -ENXIO;
275
276 if (arch_timer_rate == 0) { 264 if (arch_timer_rate == 0) {
277 freq = arch_timer_reg_read(ARCH_TIMER_PHYS_ACCESS, 265 freq = arch_timer_reg_read(ARCH_TIMER_PHYS_ACCESS,
278 ARCH_TIMER_REG_FREQ); 266 ARCH_TIMER_REG_FREQ);