Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37bcc03f authored by John Crispin's avatar John Crispin Committed by Ralf Baechle
Browse files

MIPS: ralink: Fix invalid tick count



The current code adds the delta twice, which is obviously wrong.

Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11443/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 73afa6c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}