aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.9
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-04-10 16:07:50 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-04-10 16:07:50 +0000
commitd72b4183466b57322077a79465d52b1693453ea3 (patch)
tree267433ab2e69d5086f046e9b045cb4c17862b14f /target/linux/generic/patches-3.9
parent89cca284e2465871e8a7e28e7714f28b1397b7ba (diff)
downloadupstream-d72b4183466b57322077a79465d52b1693453ea3.tar.gz
upstream-d72b4183466b57322077a79465d52b1693453ea3.tar.bz2
upstream-d72b4183466b57322077a79465d52b1693453ea3.zip
kernel: calibrate the TWD timer even when booting with only one CPU, it is used for the watchdog timer base
Fixes booting on single-core CNS3xxx devices Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36308 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.9')
-rw-r--r--target/linux/generic/patches-3.9/995-mpcore_twd_calibrate_single_core.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.9/995-mpcore_twd_calibrate_single_core.patch b/target/linux/generic/patches-3.9/995-mpcore_twd_calibrate_single_core.patch
new file mode 100644
index 0000000000..447aaca5bc
--- /dev/null
+++ b/target/linux/generic/patches-3.9/995-mpcore_twd_calibrate_single_core.patch
@@ -0,0 +1,23 @@
+--- a/arch/arm/kernel/smp_twd.c
++++ b/arch/arm/kernel/smp_twd.c
+@@ -186,7 +186,7 @@ core_initcall(twd_cpufreq_init);
+
+ #endif
+
+-static void __cpuinit twd_calibrate_rate(void)
++static int twd_calibrate_rate(void)
+ {
+ unsigned long count;
+ u64 waitjiffies;
+@@ -223,8 +223,11 @@ static void __cpuinit twd_calibrate_rate
+ printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
+ (twd_timer_rate / 10000) % 100);
+ }
++ return 0;
+ }
+
++device_initcall(twd_calibrate_rate);
++
+ static irqreturn_t twd_handler(int irq, void *dev_id)
+ {
+ struct clock_event_device *evt = *(struct clock_event_device **)dev_id;