Skip to content

Commit

Permalink
ARM: integrator: add Integrator/CP sched_clock support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Feb 19, 2011
1 parent 0462b44 commit d77e270
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions arch/arm/mach-integrator/integrator_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#include <plat/clcd.h>
#include <plat/fpga-irq.h>
#include <plat/sched_clock.h>

#include "common.h"

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-versatile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config PLAT_VERSATILE_LEDS
depends on ARCH_REALVIEW || ARCH_VERSATILE

config PLAT_VERSATILE_SCHED_CLOCK
def_bool y if !ARCH_INTEGRATOR
def_bool y if !ARCH_INTEGRATOR_AP
select HAVE_SCHED_CLOCK

endif

0 comments on commit d77e270

Please sign in to comment.