]> Pileus Git - ~andy/linux/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)
commit63d88f1ac71173e47c40ea116e4489f71c6ed9c7
treeaa3f33239ba3236fd09c46db5dd1f526b1948931
parent8c31bec28b69a86aa83f072e6e00225380853a9e
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