提交 a9cf98d9 编写于 作者: R Rabin Vincent 提交者: Aurelien Jarno

arm_timer: fix oneshot mode

In oneshot mode, the delta needs to come from the TimerLoad register,
not the maximum limit.
Signed-off-by: NRabin Vincent <rabin@rab.in>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 d6759902
......@@ -71,7 +71,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload)
{
uint32_t limit;
if ((s->control & TIMER_CTRL_PERIODIC) == 0) {
if ((s->control & (TIMER_CTRL_PERIODIC | TIMER_CTRL_ONESHOT)) == 0) {
/* Free running. */
if (s->control & TIMER_CTRL_32BIT)
limit = 0xffffffff;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册