MIPS: ralink: Fix invalid tick count
authorJohn Crispin <blogic@openwrt.org>
Wed, 4 Nov 2015 10:50:10 +0000 (11:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 11 Nov 2015 07:38:04 +0000 (08:38 +0100)
The current code adds the delta twice, which is obviously wrong.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11443/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/ralink/cevt-rt3352.c

index a8e70a9f274bdf70b0be449bee57c71c513e6fc4..e46f91f971c54f85759067c26b8a5d27d98f6a74 100644 (file)
@@ -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;
 }