Skip to content

Commit

Permalink
Merge tag 'samsung-drivers' of http://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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>
  • Loading branch information
Olof Johansson committed May 22, 2014
2 parents ed99885 + 93bfb76 commit efca0a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/clocksource/exynos_mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/of_irq.h>
#include <linux/of_address.h>
#include <linux/clocksource.h>
#include <linux/sched_clock.h>

#define EXYNOS4_MCTREG(x) (x)
#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit efca0a3

Please sign in to comment.