diff options
| author | Olof Johansson <olof@lixom.net> | 2014-05-22 01:32:57 -0400 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-05-22 01:32:57 -0400 |
| commit | efca0a3e85045da839320d7c5121f82d55be8b79 (patch) | |
| tree | ac3a55fc94cea3c3bc518f6ea4c819ab9c742104 | |
| parent | ed99885ccb89471f52d34b74b15fc9059bf07504 (diff) | |
| parent | 93bfb769752babdc4d3665a1fb166bb4e3ff927b (diff) | |
Merge tag 'samsung-drivers' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
Merge "Samsung driver update for 3.16" from Kukjin Kim:
exynos_mct update for v3.16
- register sched_clock callback to use clocksource mct-frc
* tag 'samsung-drivers' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
clocksource: exynos_mct: register sched_clock callback
Signed-off-by: Olof Johansson <olof@lixom.net>
| -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 acf5a329d538..8d6420013a04 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/of_irq.h> | 24 | #include <linux/of_irq.h> |
| 25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
| 26 | #include <linux/clocksource.h> | 26 | #include <linux/clocksource.h> |
| 27 | #include <linux/sched_clock.h> | ||
| 27 | 28 | ||
| 28 | #define EXYNOS4_MCTREG(x) (x) | 29 | #define EXYNOS4_MCTREG(x) (x) |
| 29 | #define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100) | 30 | #define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100) |
| @@ -192,12 +193,19 @@ struct clocksource mct_frc = { | |||
| 192 | .resume = exynos4_frc_resume, | 193 | .resume = exynos4_frc_resume, |
| 193 | }; | 194 | }; |
| 194 | 195 | ||
| 196 | static u64 notrace exynos4_read_sched_clock(void) | ||
| 197 | { | ||
| 198 | return exynos4_frc_read(&mct_frc); | ||
| 199 | } | ||
| 200 | |||
| 195 | static void __init exynos4_clocksource_init(void) | 201 | static void __init exynos4_clocksource_init(void) |
| 196 | { | 202 | { |
| 197 | exynos4_mct_frc_start(0, 0); | 203 | exynos4_mct_frc_start(0, 0); |
| 198 | 204 | ||
| 199 | if (clocksource_register_hz(&mct_frc, clk_rate)) | 205 | if (clocksource_register_hz(&mct_frc, clk_rate)) |
| 200 | panic("%s: can't register clocksource\n", mct_frc.name); | 206 | panic("%s: can't register clocksource\n", mct_frc.name); |
| 207 | |||
| 208 | sched_clock_register(exynos4_read_sched_clock, 64, clk_rate); | ||
| 201 | } | 209 | } |
| 202 | 210 | ||
| 203 | static void exynos4_mct_comp0_stop(void) | 211 | static void exynos4_mct_comp0_stop(void) |
