ramips: fix a bug in the cevt code on mt7620
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 18 Jun 2015 12:06:15 +0000 (12:06 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 18 Jun 2015 12:06:15 +0000 (12:06 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
Backport of r46038

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@46039 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/ramips/patches-3.18/999-cevt.patch [new file with mode: 0644]

diff --git a/target/linux/ramips/patches-3.18/999-cevt.patch b/target/linux/ramips/patches-3.18/999-cevt.patch
new file mode 100644 (file)
index 0000000..dbab467
--- /dev/null
@@ -0,0 +1,14 @@
+Index: linux-3.18.16/arch/mips/ralink/cevt-rt3352.c
+===================================================================
+--- linux-3.18.16.orig/arch/mips/ralink/cevt-rt3352.c  2015-06-14 09:10:18.544132719 +0200
++++ linux-3.18.16/arch/mips/ralink/cevt-rt3352.c       2015-06-18 13:30:04.830117077 +0200
+@@ -53,8 +53,7 @@
+       sdev = container_of(evt, struct systick_device, dev);
+       count = ioread32(sdev->membase + SYSTICK_COUNT);
+-      count = (count + delta) % SYSTICK_FREQ;
+-      iowrite32(count, sdev->membase + SYSTICK_COMPARE);
++      iowrite32(count + delta, sdev->membase + SYSTICK_COMPARE);
+       return 0;
+ }