[generic/3.0]: add mpcore_wdt fixes
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.0 / 991-arm_smp_twd_fix_typo.patch
1 To get hundredths of MHz the rate needs to be divided by 10'000.
2 Here is an example:
3 twd_timer_rate = 123456789
4 Before the patch:
5 twd_timer_rate / 1000000 = 123
6 (twd_timer_rate / 1000000) % 100 = 23
7 Result: 123.23MHz.
8 After being fixed:
9 twd_timer_rate / 1000000 = 123
10 (twd_timer_rate / 10000) % 100 = 45
11 Result: 123.45MHz.
12
13 Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
14 ---
15 arch/arm/kernel/smp_twd.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18 --- a/arch/arm/kernel/smp_twd.c
19 +++ b/arch/arm/kernel/smp_twd.c
20 @@ -115,7 +115,7 @@ static void __cpuinit twd_calibrate_rate
21 twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5);
22
23 printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
24 - (twd_timer_rate / 1000000) % 100);
25 + (twd_timer_rate / 10000) % 100);
26 }
27 }
28