diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2014-02-13 15:35:07 -0500 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2014-02-26 07:49:07 -0500 |
| commit | a79528e9d849803457b6235ddb1a1cfd4e11c6cd (patch) | |
| tree | 1148e5f37f99bb6f4e6ab959edf09ceca9a0eed2 | |
| parent | 1b1ef755bd910106fef15bd55386b60e88d73e16 (diff) | |
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 <will.deacon@arm.com>
Cc: Jonathan Austin <jonathan.austin@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| -rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 11 |
1 files 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 @@ | |||
| 27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
| 28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
| 29 | #include <linux/sys_soc.h> | 29 | #include <linux/sys_soc.h> |
| 30 | #include <linux/sched_clock.h> | ||
| 30 | 31 | ||
| 31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
| 32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
| @@ -36,7 +37,6 @@ | |||
| 36 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
| 37 | 38 | ||
| 38 | #include <plat/clcd.h> | 39 | #include <plat/clcd.h> |
| 39 | #include <plat/sched_clock.h> | ||
| 40 | 40 | ||
| 41 | #include "hardware.h" | 41 | #include "hardware.h" |
| 42 | #include "cm.h" | 42 | #include "cm.h" |
| @@ -225,11 +225,14 @@ static struct clcd_board clcd_data = { | |||
| 225 | 225 | ||
| 226 | #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) | 226 | #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) |
| 227 | 227 | ||
| 228 | static u64 notrace intcp_read_sched_clock(void) | ||
| 229 | { | ||
| 230 | return readl(REFCOUNTER); | ||
| 231 | } | ||
| 232 | |||
| 228 | static void __init intcp_init_early(void) | 233 | static void __init intcp_init_early(void) |
| 229 | { | 234 | { |
| 230 | #ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK | 235 | sched_clock_register(intcp_read_sched_clock, 32, 24000000); |
| 231 | versatile_sched_clock_init(REFCOUNTER, 24000000); | ||
| 232 | #endif | ||
| 233 | } | 236 | } |
| 234 | 237 | ||
| 235 | static const struct of_device_id fpga_irq_of_match[] __initconst = { | 238 | static const struct of_device_id fpga_irq_of_match[] __initconst = { |
