This source file includes following definitions.
- null_perf_irq
- cpu_has_mfc0_count_bug
- time_init
1
2
3
4
5
6
7
8
9 #include <linux/bug.h>
10 #include <linux/clockchips.h>
11 #include <linux/types.h>
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/sched.h>
15 #include <linux/param.h>
16 #include <linux/time.h>
17 #include <linux/timex.h>
18 #include <linux/smp.h>
19 #include <linux/spinlock.h>
20 #include <linux/export.h>
21
22 #include <asm/cpu-features.h>
23 #include <asm/cpu-type.h>
24 #include <asm/div64.h>
25 #include <asm/time.h>
26
27
28
29
30 DEFINE_SPINLOCK(rtc_lock);
31 EXPORT_SYMBOL(rtc_lock);
32
33 static int null_perf_irq(void)
34 {
35 return 0;
36 }
37
38 int (*perf_irq)(void) = null_perf_irq;
39
40 EXPORT_SYMBOL(perf_irq);
41
42
43
44
45
46
47
48
49
50
51
52
53 unsigned int mips_hpt_frequency;
54 EXPORT_SYMBOL_GPL(mips_hpt_frequency);
55
56 static __init int cpu_has_mfc0_count_bug(void)
57 {
58 switch (current_cpu_type()) {
59 case CPU_R4000PC:
60 case CPU_R4000SC:
61 case CPU_R4000MC:
62
63
64
65
66
67 return 1;
68
69 case CPU_R4400PC:
70 case CPU_R4400SC:
71 case CPU_R4400MC:
72
73
74
75
76 if ((current_cpu_data.processor_id & 0xff) <= 0x30)
77 return 1;
78
79
80
81
82 return 0;
83 }
84
85 return 0;
86 }
87
88 void __init time_init(void)
89 {
90 plat_time_init();
91
92
93
94
95
96
97
98
99
100 if (mips_clockevent_init() != 0 || !cpu_has_mfc0_count_bug())
101 init_mips_clocksource();
102 }