提交 509e1f0f 编写于 作者: R Russell King

ARM: mxc: update clock source registration

In d7e81c26 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants.  Switch over to using this new interface.
Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 d28b116b
...@@ -93,7 +93,6 @@ static struct clocksource clocksource_epit = { ...@@ -93,7 +93,6 @@ static struct clocksource clocksource_epit = {
.rating = 200, .rating = 200,
.read = epit_read, .read = epit_read,
.mask = CLOCKSOURCE_MASK(32), .mask = CLOCKSOURCE_MASK(32),
.shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
}; };
...@@ -101,9 +100,7 @@ static int __init epit_clocksource_init(struct clk *timer_clk) ...@@ -101,9 +100,7 @@ static int __init epit_clocksource_init(struct clk *timer_clk)
{ {
unsigned int c = clk_get_rate(timer_clk); unsigned int c = clk_get_rate(timer_clk);
clocksource_epit.mult = clocksource_hz2mult(c, clocksource_register_hz(&clocksource_epit, c);
clocksource_epit.shift);
clocksource_register(&clocksource_epit);
return 0; return 0;
} }
......
...@@ -120,7 +120,6 @@ static struct clocksource clocksource_mxc = { ...@@ -120,7 +120,6 @@ static struct clocksource clocksource_mxc = {
.rating = 200, .rating = 200,
.read = mx1_2_get_cycles, .read = mx1_2_get_cycles,
.mask = CLOCKSOURCE_MASK(32), .mask = CLOCKSOURCE_MASK(32),
.shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
}; };
...@@ -131,9 +130,7 @@ static int __init mxc_clocksource_init(struct clk *timer_clk) ...@@ -131,9 +130,7 @@ static int __init mxc_clocksource_init(struct clk *timer_clk)
if (timer_is_v2()) if (timer_is_v2())
clocksource_mxc.read = v2_get_cycles; clocksource_mxc.read = v2_get_cycles;
clocksource_mxc.mult = clocksource_hz2mult(c, clocksource_register_hz(&clocksource_mxc, c);
clocksource_mxc.shift);
clocksource_register(&clocksource_mxc);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册