aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx/patches-3.10/045-twd_base.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-31 23:40:49 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-31 23:40:49 +0000
commitac2d571b7d8bdcf6f53c6c266fb02cfb9686e65c (patch)
tree7ab55c9bbc8e965f5f7289891155e94c73193b80 /target/linux/cns3xxx/patches-3.10/045-twd_base.patch
parenta6b0a98d84acdda7b12226e4e0c46d0ca9e2d4f0 (diff)
downloadmaster-187ad058-ac2d571b7d8bdcf6f53c6c266fb02cfb9686e65c.tar.gz
master-187ad058-ac2d571b7d8bdcf6f53c6c266fb02cfb9686e65c.tar.bz2
master-187ad058-ac2d571b7d8bdcf6f53c6c266fb02cfb9686e65c.zip
cns3xxx: update to linux 3.10
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41917 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/cns3xxx/patches-3.10/045-twd_base.patch')
-rw-r--r--target/linux/cns3xxx/patches-3.10/045-twd_base.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/cns3xxx/patches-3.10/045-twd_base.patch b/target/linux/cns3xxx/patches-3.10/045-twd_base.patch
new file mode 100644
index 0000000000..b93a7f1b71
--- /dev/null
+++ b/target/linux/cns3xxx/patches-3.10/045-twd_base.patch
@@ -0,0 +1,45 @@
+--- a/arch/arm/mach-cns3xxx/core.c
++++ b/arch/arm/mach-cns3xxx/core.c
+@@ -17,6 +17,7 @@
+ #include <linux/platform_device.h>
+ #include <linux/usb/ehci_pdriver.h>
+ #include <linux/usb/ohci_pdriver.h>
++#include <asm/smp_twd.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+ #include <asm/mach/time.h>
+@@ -26,6 +27,8 @@
+ #include "core.h"
+ #include "pm.h"
+
++#define IRQ_LOCALTIMER 29
++
+ static struct map_desc cns3xxx_io_desc[] __initdata = {
+ {
+ .virtual = CNS3XXX_TC11MP_SCU_BASE_VIRT,
+@@ -159,6 +162,17 @@ static struct irqaction cns3xxx_timer_ir
+ .handler = cns3xxx_timer_interrupt,
+ };
+
++static void __init cns3xxx_init_twd(void)
++{
++#ifdef CONFIG_LOCAL_TIMERS
++ static DEFINE_TWD_LOCAL_TIMER(cns3xx_twd_local_timer,
++ CNS3XXX_TC11MP_TWD_BASE,
++ IRQ_LOCALTIMER);
++
++ twd_local_timer_register(&cns3xx_twd_local_timer);
++#endif
++}
++
+ /*
+ * Set up the clock source and clock events devices
+ */
+@@ -212,6 +226,7 @@ static void __init __cns3xxx_timer_init(
+ setup_irq(timer_irq, &cns3xxx_timer_irq);
+
+ cns3xxx_clockevents_init(timer_irq);
++ cns3xxx_init_twd();
+ }
+
+ void __init cns3xxx_timer_init(void)