diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2013-11-19 18:47:32 -0500 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2013-12-11 05:40:24 -0500 |
commit | 662e7230ee16951e6858c01e72db87c5dc46150e (patch) | |
tree | 15cadc762fa6bb76d777a5fed756c3dd8cbbf6e7 /drivers | |
parent | dfded00902d7437963870accbcf4b39114e85f59 (diff) |
clocksource: sun4i: Switch to sched_clock_register()
The 32 bit sched_clock interface now supports 64 bits. Upgrade to
the 64 bit function to allow us to remove the 32 bit registration
interface. While we're here, mark the sched_clock function as
notrace to prevent ftrace recursion crashes.
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clocksource/sun4i_timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c index d7a1a1ad8f05..191187470aa6 100644 --- a/drivers/clocksource/sun4i_timer.c +++ b/drivers/clocksource/sun4i_timer.c | |||
@@ -138,7 +138,7 @@ static struct irqaction sun4i_timer_irq = { | |||
138 | .dev_id = &sun4i_clockevent, | 138 | .dev_id = &sun4i_clockevent, |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static u32 sun4i_timer_sched_read(void) | 141 | static u64 notrace sun4i_timer_sched_read(void) |
142 | { | 142 | { |
143 | return ~readl(timer_base + TIMER_CNTVAL_REG(1)); | 143 | return ~readl(timer_base + TIMER_CNTVAL_REG(1)); |
144 | } | 144 | } |
@@ -170,7 +170,7 @@ 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 | setup_sched_clock(sun4i_timer_sched_read, 32, rate); | 173 | sched_clock_register(sun4i_timer_sched_read, 32, rate); |
174 | clocksource_mmio_init(timer_base + TIMER_CNTVAL_REG(1), node->name, | 174 | clocksource_mmio_init(timer_base + TIMER_CNTVAL_REG(1), node->name, |
175 | rate, 350, 32, clocksource_mmio_readl_down); | 175 | rate, 350, 32, clocksource_mmio_readl_down); |
176 | 176 | ||