aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.8
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
commitedd8048107d1c96775b4ce372a24ff5daba05eae (patch)
treeff5911128b6ef6a87f27d37f78ab26008e97e331 /target/linux/generic/patches-3.8
parent06733c265084ba453c192ebfc203d3f4f230643a (diff)
downloadupstream-edd8048107d1c96775b4ce372a24ff5daba05eae.tar.gz
upstream-edd8048107d1c96775b4ce372a24ff5daba05eae.tar.bz2
upstream-edd8048107d1c96775b4ce372a24ff5daba05eae.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> SVN-Revision: 36308
Diffstat (limited to 'target/linux/generic/patches-3.8')
-rw-r--r--target/linux/generic/patches-3.8/995-mpcore_twd_calibrate_single_core.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.8/995-mpcore_twd_calibrate_single_core.patch b/target/linux/generic/patches-3.8/995-mpcore_twd_calibrate_single_core.patch
new file mode 100644
index 0000000000..bd5cf52324
--- /dev/null
+++ b/target/linux/generic/patches-3.8/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
+@@ -189,7 +189,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;
+@@ -226,8 +226,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;