提交 37bcc03f 编写于 作者: J John Crispin 提交者: Ralf Baechle

MIPS: ralink: Fix invalid tick count

The current code adds the delta twice, which is obviously wrong.
Signed-off-by: NJohn Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11443/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 73afa6c4
......@@ -48,7 +48,7 @@ static int systick_next_event(unsigned long delta,
sdev = container_of(evt, struct systick_device, dev);
count = ioread32(sdev->membase + SYSTICK_COUNT);
count = (count + delta) % SYSTICK_FREQ;
iowrite32(count + delta, sdev->membase + SYSTICK_COMPARE);
iowrite32(count, sdev->membase + SYSTICK_COMPARE);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册