kernel: calibrate the TWD timer even when booting with only one CPU, it is used for...
[openwrt.git] / target / linux / generic / patches-3.8 / 995-mpcore_twd_calibrate_single_core.patch
1 --- a/arch/arm/kernel/smp_twd.c
2 +++ b/arch/arm/kernel/smp_twd.c
3 @@ -189,7 +189,7 @@ core_initcall(twd_cpufreq_init);
4  
5  #endif
6  
7 -static void __cpuinit twd_calibrate_rate(void)
8 +static int twd_calibrate_rate(void)
9  {
10         unsigned long count;
11         u64 waitjiffies;
12 @@ -226,8 +226,11 @@ static void __cpuinit twd_calibrate_rate
13                 printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
14                         (twd_timer_rate / 10000) % 100);
15         }
16 +       return 0;
17  }
18  
19 +device_initcall(twd_calibrate_rate);
20 +
21  static irqreturn_t twd_handler(int irq, void *dev_id)
22  {
23         struct clock_event_device *evt = *(struct clock_event_device **)dev_id;