]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: sun4i: Fix the next event code
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 16 Jul 2013 14:45:38 +0000 (16:45 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 18 Jul 2013 13:27:17 +0000 (15:27 +0200)
commit3e1555926e8963237845bf655c255ffc87a058a6
treeaa3f33239ba3236fd09c46db5dd1f526b1948931
parentf45534996d6d38fe0ef9fca7dc3dcea2b1c48127
clocksource: sun4i: Fix the next event code

The next_event logic was setting the next interval to fire in the
current timer value instead of the interval value register, which is
obviously wrong.

Plus, the logic to set the actual value was wrong as well: the interval
register can only be modified when the timer is disabled, and then
enable it back, otherwise, it'll have no effect. Fix this logic as well
since that code couldn't possibly work.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/sun4i_timer.c