diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-22 06:37:54 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-19 06:11:46 -0500 |
commit | d77e270c53a4911d23ded9f4ab8b175a3fe3bb34 (patch) | |
tree | 7ef42283816f32d55389026e51d6e9fdcae84f7a /arch | |
parent | 0462b4477ea3260304bbcd97c64c0b704b4f0f85 (diff) |
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')
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-versatile/Kconfig | 2 |
2 files changed, 8 insertions, 1 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 @@ | |||
44 | 44 | ||
45 | #include <plat/clcd.h> | 45 | #include <plat/clcd.h> |
46 | #include <plat/fpga-irq.h> | 46 | #include <plat/fpga-irq.h> |
47 | #include <plat/sched_clock.h> | ||
47 | 48 | ||
48 | #include "common.h" | 49 | #include "common.h" |
49 | 50 | ||
@@ -440,11 +441,17 @@ static struct amba_device *amba_devs[] __initdata = { | |||
440 | &clcd_device, | 441 | &clcd_device, |
441 | }; | 442 | }; |
442 | 443 | ||
444 | #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) | ||
445 | |||
443 | static void __init intcp_init_early(void) | 446 | static void __init intcp_init_early(void) |
444 | { | 447 | { |
445 | clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups)); | 448 | clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups)); |
446 | 449 | ||
447 | integrator_init_early(); | 450 | integrator_init_early(); |
451 | |||
452 | #ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK | ||
453 | versatile_sched_clock_init(REFCOUNTER, 24000000); | ||
454 | #endif | ||
448 | } | 455 | } |
449 | 456 | ||
450 | static void __init intcp_init(void) | 457 | static void __init intcp_init(void) |
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index 0b275008d3e0..52353beb369d 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig | |||
@@ -11,7 +11,7 @@ config PLAT_VERSATILE_LEDS | |||
11 | depends on ARCH_REALVIEW || ARCH_VERSATILE | 11 | depends on ARCH_REALVIEW || ARCH_VERSATILE |
12 | 12 | ||
13 | config PLAT_VERSATILE_SCHED_CLOCK | 13 | config PLAT_VERSATILE_SCHED_CLOCK |
14 | def_bool y if !ARCH_INTEGRATOR | 14 | def_bool y if !ARCH_INTEGRATOR_AP |
15 | select HAVE_SCHED_CLOCK | 15 | select HAVE_SCHED_CLOCK |
16 | 16 | ||
17 | endif | 17 | endif |