From a79528e9d849803457b6235ddb1a1cfd4e11c6cd Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 13 Feb 2014 21:35:07 +0100 Subject: [PATCH] ARM: integrator: register sched_clock directly The detour through plat-versatile/sched-clock.c is hard to migrate to multiplatform set-up and it's very little code being duplicated so let's just inline the sched_clock registration and cut one more dependency to plat-versatile. This also makes this sched_clock implementation compulsory. Cc: Will Deacon Cc: Jonathan Austin Cc: Russell King Signed-off-by: Linus Walleij --- arch/arm/mach-integrator/integrator_cp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index c97ab88897cf..a938242b0c95 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -36,7 +37,6 @@ #include #include -#include #include "hardware.h" #include "cm.h" @@ -225,11 +225,14 @@ static struct clcd_board clcd_data = { #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) +static u64 notrace intcp_read_sched_clock(void) +{ + return readl(REFCOUNTER); +} + static void __init intcp_init_early(void) { -#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK - versatile_sched_clock_init(REFCOUNTER, 24000000); -#endif + sched_clock_register(intcp_read_sched_clock, 32, 24000000); } static const struct of_device_id fpga_irq_of_match[] __initconst = { -- 2.20.1