ARM: OMAP5: Enable arch timer support
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Mon, 13 Aug 2012 09:09:03 +0000 (14:39 +0530)
committerSantosh Shilimkar <santosh.shilimkar@ti.com>
Wed, 19 Sep 2012 07:30:37 +0000 (13:00 +0530)
Enable Cortex A15 generic timer support for OMAP5 based SOCs.
The CPU local timers run on the free running real time counter clock.

Acked-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
arch/arm/boot/dts/omap5.dtsi
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/timer.c

index 57e527083746ed93a69624c0009af7ad548bca67..7b986eddd0b9111ba6ad02372e39555e7154e902 100644 (file)
        cpus {
                cpu@0 {
                        compatible = "arm,cortex-a15";
+                       timer {
+                               compatible = "arm,armv7-timer";
+                               /* 14th PPI IRQ, active low level-sensitive */
+                               interrupts = <1 14 0x308>;
+                               clock-frequency = <6144000>;
+                       };
                };
                cpu@1 {
                        compatible = "arm,cortex-a15";
+                       timer {
+                               compatible = "arm,armv7-timer";
+                               /* 14th PPI IRQ, active low level-sensitive */
+                               interrupts = <1 14 0x308>;
+                               clock-frequency = <6144000>;
+                       };
                };
        };
 
index 4b773fd569783ccfe7b19cd7e4e6d2eb82830a24..4609163b03954638502a662bc12fb9daf498123e 100644 (file)
@@ -74,6 +74,7 @@ config SOC_OMAP5
        select HAVE_SMP
        select ARM_CPU_SUSPEND if PM
        select SOC_HAS_REALTIME_COUNTER
+       select ARM_ARCH_TIMER
 
 comment "OMAP Core Type"
        depends on ARCH_OMAP2
index 026fcfff6698e0667b372df713286054dd4b6781..2c5a45d8ca8c4102458ec5f0aa6a05fb8a812765 100644 (file)
@@ -41,6 +41,7 @@
 #include <plat/dmtimer.h>
 #include <asm/smp_twd.h>
 #include <asm/sched_clock.h>
+#include <asm/arch_timer.h>
 #include "common.h"
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
@@ -488,9 +489,15 @@ OMAP_SYS_TIMER(4)
 #ifdef CONFIG_SOC_OMAP5
 static void __init omap5_timer_init(void)
 {
+       int err;
+
        omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
        omap2_clocksource_init(2, OMAP4_MPU_SOURCE);
        realtime_counter_init();
+
+       err = arch_timer_of_register();
+       if (err)
+               pr_err("%s: arch_timer_register failed %d\n", __func__, err);
 }
 OMAP_SYS_TIMER(5)
 #endif
This page took 0.026893 seconds and 5 git commands to generate.