Commit a79528e9 authored by Linus Walleij's avatar Linus Walleij

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: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1b1ef755
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/sys_soc.h> #include <linux/sys_soc.h>
#include <linux/sched_clock.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <plat/clcd.h> #include <plat/clcd.h>
#include <plat/sched_clock.h>
#include "hardware.h" #include "hardware.h"
#include "cm.h" #include "cm.h"
...@@ -225,11 +225,14 @@ static struct clcd_board clcd_data = { ...@@ -225,11 +225,14 @@ static struct clcd_board clcd_data = {
#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) #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) static void __init intcp_init_early(void)
{ {
#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK sched_clock_register(intcp_read_sched_clock, 32, 24000000);
versatile_sched_clock_init(REFCOUNTER, 24000000);
#endif
} }
static const struct of_device_id fpga_irq_of_match[] __initconst = { static const struct of_device_id fpga_irq_of_match[] __initconst = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment