mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-12 17:24:58 +00:00
clocksource: exynos_mct: register sched_clock callback
Use the clocksource mct-frc for sched_clock Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
This commit is contained in:
parent
c9eaa447e7
commit
93bfb76975
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
||||||
#include <linux/of_irq.h>
|
#include <linux/of_irq.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/clocksource.h>
|
#include <linux/clocksource.h>
|
||||||
|
#include <linux/sched_clock.h>
|
||||||
|
|
||||||
#define EXYNOS4_MCTREG(x) (x)
|
#define EXYNOS4_MCTREG(x) (x)
|
||||||
#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
|
#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
|
||||||
|
@ -192,12 +193,19 @@ struct clocksource mct_frc = {
|
||||||
.resume = exynos4_frc_resume,
|
.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)
|
static void __init exynos4_clocksource_init(void)
|
||||||
{
|
{
|
||||||
exynos4_mct_frc_start(0, 0);
|
exynos4_mct_frc_start(0, 0);
|
||||||
|
|
||||||
if (clocksource_register_hz(&mct_frc, clk_rate))
|
if (clocksource_register_hz(&mct_frc, clk_rate))
|
||||||
panic("%s: can't register clocksource\n", mct_frc.name);
|
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)
|
static void exynos4_mct_comp0_stop(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue