From 93bfb769752babdc4d3665a1fb166bb4e3ff927b Mon Sep 17 00:00:00 2001 From: Vincent Guittot Date: Fri, 2 May 2014 22:27:01 +0900 Subject: [PATCH] clocksource: exynos_mct: register sched_clock callback Use the clocksource mct-frc for sched_clock Signed-off-by: Vincent Guittot Reviewed-by: Tomasz Figa Acked-by: Daniel Lezcano Signed-off-by: Kukjin Kim --- drivers/clocksource/exynos_mct.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index a6ee6d7cd63f..ea4dfc097790 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -24,6 +24,7 @@ #include #include #include +#include #define EXYNOS4_MCTREG(x) (x) #define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100) @@ -192,12 +193,19 @@ struct clocksource mct_frc = { .resume = exynos4_frc_resume, }; +static u64 notrace exynos4_read_sched_clock(void) +{ + return exynos4_frc_read(&mct_frc); +} + static void __init exynos4_clocksource_init(void) { exynos4_mct_frc_start(0, 0); if (clocksource_register_hz(&mct_frc, clk_rate)) panic("%s: can't register clocksource\n", mct_frc.name); + + sched_clock_register(exynos4_read_sched_clock, 64, clk_rate); } static void exynos4_mct_comp0_stop(void) -- 2.20.1