mirror of https://github.com/hak5/openwrt-owl.git
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: 36308owl
parent
06733c2650
commit
edd8048107
|
@ -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;
|
|
@ -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;
|
Loading…
Reference in New Issue