diff options
author | John Crispin <blogic@openwrt.org> | 2015-11-04 05:50:10 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-11-11 02:38:04 -0500 |
commit | 37bcc03f97e05cc65ce87d3b2fdcd4e5b28ce06c (patch) | |
tree | 2eb39775bf91f5732959a8d14e8aa9a1fed502aa | |
parent | 73afa6c4208257ea1733a03918fea731a18131e7 (diff) |
MIPS: ralink: Fix invalid tick count
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>
-rw-r--r-- | arch/mips/ralink/cevt-rt3352.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/ralink/cevt-rt3352.c b/arch/mips/ralink/cevt-rt3352.c index a8e70a9f274b..e46f91f971c5 100644 --- a/arch/mips/ralink/cevt-rt3352.c +++ b/arch/mips/ralink/cevt-rt3352.c | |||
@@ -48,7 +48,7 @@ static int systick_next_event(unsigned long delta, | |||
48 | sdev = container_of(evt, struct systick_device, dev); | 48 | sdev = container_of(evt, struct systick_device, dev); |
49 | count = ioread32(sdev->membase + SYSTICK_COUNT); | 49 | count = ioread32(sdev->membase + SYSTICK_COUNT); |
50 | count = (count + delta) % SYSTICK_FREQ; | 50 | count = (count + delta) % SYSTICK_FREQ; |
51 | iowrite32(count + delta, sdev->membase + SYSTICK_COMPARE); | 51 | iowrite32(count, sdev->membase + SYSTICK_COMPARE); |
52 | 52 | ||
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |