aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/Kconfig1
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
index 350e26636a06..5a6148ab6dac 100644
--- a/arch/arm/mach-integrator/Kconfig
+++ b/arch/arm/mach-integrator/Kconfig
@@ -5,6 +5,7 @@ menu "Integrator Options"
5config ARCH_INTEGRATOR_AP 5config ARCH_INTEGRATOR_AP
6 bool "Support Integrator/AP and Integrator/PP2 platforms" 6 bool "Support Integrator/AP and Integrator/PP2 platforms"
7 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select HAVE_SCHED_CLOCK
8 select MIGHT_HAVE_PCI 9 select MIGHT_HAVE_PCI
9 select SERIAL_AMBA_PL010 10 select SERIAL_AMBA_PL010
10 select SERIAL_AMBA_PL010_CONSOLE 11 select SERIAL_AMBA_PL010_CONSOLE
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 21a1d6cbef40..4dde28b9dc07 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -42,6 +42,7 @@
42#include <asm/setup.h> 42#include <asm/setup.h>
43#include <asm/param.h> /* HZ */ 43#include <asm/param.h> /* HZ */
44#include <asm/mach-types.h> 44#include <asm/mach-types.h>
45#include <asm/sched_clock.h>
45 46
46#include <mach/lm.h> 47#include <mach/lm.h>
47 48
@@ -325,6 +326,11 @@ static void __init ap_init(void)
325 326
326static unsigned long timer_reload; 327static unsigned long timer_reload;
327 328
329static u32 notrace integrator_read_sched_clock(void)
330{
331 return -readl((void __iomem *) TIMER2_VA_BASE + TIMER_VALUE);
332}
333
328static void integrator_clocksource_init(unsigned long inrate) 334static void integrator_clocksource_init(unsigned long inrate)
329{ 335{
330 void __iomem *base = (void __iomem *)TIMER2_VA_BASE; 336 void __iomem *base = (void __iomem *)TIMER2_VA_BASE;
@@ -341,6 +347,7 @@ static void integrator_clocksource_init(unsigned long inrate)
341 347
342 clocksource_mmio_init(base + TIMER_VALUE, "timer2", 348 clocksource_mmio_init(base + TIMER_VALUE, "timer2",
343 rate, 200, 16, clocksource_mmio_readl_down); 349 rate, 200, 16, clocksource_mmio_readl_down);
350 setup_sched_clock(integrator_read_sched_clock, 16, rate);
344} 351}
345 352
346static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE; 353static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE;