diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-05-08 12:02:43 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:43:24 +0900 |
commit | f1a7fb060d58282a2bfab131273aa343ce1de0ad (patch) | |
tree | d74c1c1c36712e8cee668e8fa1387687479e4480 /drivers | |
parent | 0027395b6c4b3b3e7a5ce12a3bb7b22fab294b79 (diff) | |
download | linux-3.10-f1a7fb060d58282a2bfab131273aa343ce1de0ad.tar.gz linux-3.10-f1a7fb060d58282a2bfab131273aa343ce1de0ad.tar.bz2 linux-3.10-f1a7fb060d58282a2bfab131273aa343ce1de0ad.zip |
clocksource: exynos_mct: Register sched_clock
This patch adds sched_clock registration to Exynos MCT driver to
improve scheduler precision by providing a high resolution clock source
for scheduling purposes.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Conflicts:
drivers/clocksource/exynos_mct.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clocksource/exynos_mct.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index b7960185919..b5de04ec051 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -25,6 +25,7 @@ #include <linux/clocksource.h> #include <asm/localtimer.h> +#include <asm/sched_clock.h> #include <asm/mach/time.h> #define EXYNOS4_MCTREG(x) (x) @@ -190,10 +191,17 @@ struct clocksource mct_frc = { .resume = exynos4_frc_resume, }; +static u32 notrace exynos4_mct_read_sched_clock(void) +{ + return __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_L); +} + static void __init exynos4_clocksource_init(void) { exynos4_mct_frc_start(0, 0); + setup_sched_clock(exynos4_mct_read_sched_clock, 32, clk_rate); + if (clocksource_register_hz(&mct_frc, clk_rate)) panic("%s: can't register clocksource\n", mct_frc.name); } |