summaryrefslogtreecommitdiff
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-22 14:37:54 +0300
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-19 14:11:46 +0300
commitd77e270c53a4911d23ded9f4ab8b175a3fe3bb34 (patch)
tree7ef42283816f32d55389026e51d6e9fdcae84f7a /arch/arm/mach-integrator
parent0462b4477ea3260304bbcd97c64c0b704b4f0f85 (diff)
downloadlinux-d77e270c53a4911d23ded9f4ab8b175a3fe3bb34.tar.xz
ARM: integrator: add Integrator/CP sched_clock support
Integrator/CP has the 24MHz counter which Versatile and later platforms also have, which we use for sched_clock support. Allow this counter to be used when building a kernel targetting Integrator/CP alone. Integrator/AP does not have this counter, so we must exclude support for the Integrator family when this is enabled. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 05da36f754dd..9e3ce26023e8 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -44,6 +44,7 @@
#include <plat/clcd.h>
#include <plat/fpga-irq.h>
+#include <plat/sched_clock.h>
#include "common.h"
@@ -440,11 +441,17 @@ static struct amba_device *amba_devs[] __initdata = {
&clcd_device,
};
+#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28)
+
static void __init intcp_init_early(void)
{
clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups));
integrator_init_early();
+
+#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK
+ versatile_sched_clock_init(REFCOUNTER, 24000000);
+#endif
}
static void __init intcp_init(void)