aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx/patches-3.8/045-twd_base.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-03-09 18:51:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-03-09 18:51:46 +0000
commit95f14d052a7439c60e35a6d910d6bd3de023907c (patch)
tree83b1039c3c9d0ff8d8b842d1ec5fc4a392a3a7d2 /target/linux/cns3xxx/patches-3.8/045-twd_base.patch
parent85348d602e2c4b383fa0bec95fb97d9d79094743 (diff)
downloadupstream-95f14d052a7439c60e35a6d910d6bd3de023907c.tar.gz
upstream-95f14d052a7439c60e35a6d910d6bd3de023907c.tar.bz2
upstream-95f14d052a7439c60e35a6d910d6bd3de023907c.zip
cns3xxx: add linux 3.8 support and use it by default
SVN-Revision: 35908
Diffstat (limited to 'target/linux/cns3xxx/patches-3.8/045-twd_base.patch')
-rw-r--r--target/linux/cns3xxx/patches-3.8/045-twd_base.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/cns3xxx/patches-3.8/045-twd_base.patch b/target/linux/cns3xxx/patches-3.8/045-twd_base.patch
new file mode 100644
index 0000000000..a9ad3ec482
--- /dev/null
+++ b/target/linux/cns3xxx/patches-3.8/045-twd_base.patch
@@ -0,0 +1,36 @@
+--- a/arch/arm/mach-cns3xxx/core.c
++++ b/arch/arm/mach-cns3xxx/core.c
+@@ -19,6 +19,7 @@
+ #include <asm/mach/time.h>
+ #include <asm/mach/irq.h>
+ #include <asm/hardware/gic.h>
++#include <asm/smp_twd.h>
+ #include <asm/hardware/cache-l2x0.h>
+ #include <mach/cns3xxx.h>
+ #include "core.h"
+@@ -187,6 +188,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
+ */
+@@ -240,6 +252,7 @@ static void __init __cns3xxx_timer_init(
+ setup_irq(timer_irq, &cns3xxx_timer_irq);
+
+ cns3xxx_clockevents_init(timer_irq);
++ cns3xxx_init_twd();
+ }
+
+ static void __init cns3xxx_timer_init(void)