Skip to content
Commit 0aeac458 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt
Browse files

clocksource: sh_tmu: __clocksource_updatefreq_hz() update



This patch updates the clocksource part of the TMU driver
to make use of the __clocksource_updatefreq_hz() function.

Without this patch the old code uses clocksource_register()
together with a hack that assumes a never changing clock rate
(see clk_enable(), clk_get_rate() and clk_disable()).

The patch uses clocksource_register_hz() with 1 Hz as initial
value, then lets the ->enable() callback update the value
with __clocksource_updatefreq_hz() once the struct clk has
been enabled and the frequency is stable.

Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Acked-by: default avatarJohn Stultz <johnstul@us.ibm.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 01fa68b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment