diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-03-30 16:17:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-31 03:15:58 -0400 |
commit | 37b8b003c483191a327a740fc32c1993959e7ae9 (patch) | |
tree | a158501ef6a3db43b88aa0382652b108711781f1 | |
parent | 59196bcef5c1034f020fe5bf3579f89767537246 (diff) |
clocksource/drivers/sun4i-timer: Only register a sched_clock on sun4i and sun5i
sun6i and newer have an arm arch timer which is a better
sched_clock source then the sun4i-timer, and sched_clock does
not have priorities, so do not register the sun4i-timer
sched_clock at all on sun6i and newer.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: ben.dooks@codethink.co.uk
Cc: digetx@gmail.com
Cc: laurent.pinchart+renesas@ideasonboard.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: viresh.kumar@linaro.org
Link: http://lkml.kernel.org/r/1427746633-9137-8-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | drivers/clocksource/sun4i_timer.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c index f4a9c0058b4d..1928a8912584 100644 --- a/drivers/clocksource/sun4i_timer.c +++ b/drivers/clocksource/sun4i_timer.c | |||
@@ -170,7 +170,15 @@ static void __init sun4i_timer_init(struct device_node *node) | |||
170 | TIMER_CTL_CLK_SRC(TIMER_CTL_CLK_SRC_OSC24M), | 170 | TIMER_CTL_CLK_SRC(TIMER_CTL_CLK_SRC_OSC24M), |
171 | timer_base + TIMER_CTL_REG(1)); | 171 | timer_base + TIMER_CTL_REG(1)); |
172 | 172 | ||
173 | sched_clock_register(sun4i_timer_sched_read, 32, rate); | 173 | /* |
174 | * sched_clock_register does not have priorities, and on sun6i and | ||
175 | * later there is a better sched_clock registered by arm_arch_timer.c | ||
176 | */ | ||
177 | if (of_machine_is_compatible("allwinner,sun4i-a10") || | ||
178 | of_machine_is_compatible("allwinner,sun5i-a13") || | ||
179 | of_machine_is_compatible("allwinner,sun5i-a10s")) | ||
180 | sched_clock_register(sun4i_timer_sched_read, 32, rate); | ||
181 | |||
174 | clocksource_mmio_init(timer_base + TIMER_CNTVAL_REG(1), node->name, | 182 | clocksource_mmio_init(timer_base + TIMER_CNTVAL_REG(1), node->name, |
175 | rate, 350, 32, clocksource_mmio_readl_down); | 183 | rate, 350, 32, clocksource_mmio_readl_down); |
176 | 184 | ||