Message ID | 1357747640-18594-3-git-send-email-mark.rutland@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wednesday 09 January 2013 09:37 PM, Mark Rutland wrote: > 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> > --- Multi-platform build without DT could still benefit from the check but I guess the most of the A15 based platform are DT only, so its should be good to get rid of the check. Regards, Santosh
On Fri, Jan 11, 2013 at 01:11:41PM +0000, Santosh Shilimkar wrote: > On Wednesday 09 January 2013 09:37 PM, Mark Rutland wrote: > > 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> > > --- > Multi-platform build without DT could still benefit from the > check but I guess the most of the A15 based platform are DT > only, so its should be good to get rid of the check. Indeed. I'm under the impression that all platforms which might have an architected timer are devicetree only. > > Regards, > Santosh > Thanks, Mark.
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c index 6dd73c6..1bb3b58 100644 --- a/arch/arm/kernel/arch_timer.c +++ b/arch/arm/kernel/arch_timer.c @@ -20,11 +20,9 @@ #include <linux/of_irq.h> #include <linux/io.h> -#include <asm/cputype.h> #include <asm/delay.h> #include <asm/localtimer.h> #include <asm/arch_timer.h> -#include <asm/system_info.h> #include <asm/sched_clock.h> static unsigned long arch_timer_rate; @@ -259,20 +257,10 @@ static int __cpuinit arch_timer_setup(struct clock_event_device *clk) return 0; } -/* Is the optional system timer available? */ -static int local_timer_is_architected(void) -{ - return (cpu_architecture() >= CPU_ARCH_ARMv7) && - ((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1; -} - static int arch_timer_available(void) { unsigned long freq; - if (!local_timer_is_architected()) - return -ENXIO; - if (arch_timer_rate == 0) { freq = arch_timer_reg_read(ARCH_TIMER_PHYS_ACCESS, ARCH_TIMER_REG_FREQ);