diff options
Diffstat (limited to 'arch/mips/ar7/time.c')
-rw-r--r-- | arch/mips/ar7/time.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/mips/ar7/time.c b/arch/mips/ar7/time.c index a1fba894daa2..5fb8a0134085 100644 --- a/arch/mips/ar7/time.c +++ b/arch/mips/ar7/time.c | |||
@@ -20,11 +20,21 @@ | |||
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
23 | #include <linux/err.h> | ||
24 | #include <linux/clk.h> | ||
23 | 25 | ||
24 | #include <asm/time.h> | 26 | #include <asm/time.h> |
25 | #include <asm/mach-ar7/ar7.h> | 27 | #include <asm/mach-ar7/ar7.h> |
26 | 28 | ||
27 | void __init plat_time_init(void) | 29 | void __init plat_time_init(void) |
28 | { | 30 | { |
29 | mips_hpt_frequency = ar7_cpu_freq() / 2; | 31 | struct clk *cpu_clk; |
32 | |||
33 | cpu_clk = clk_get(NULL, "cpu"); | ||
34 | if (IS_ERR(cpu_clk)) { | ||
35 | printk(KERN_ERR "unable to get cpu clock\n"); | ||
36 | return; | ||
37 | } | ||
38 | |||
39 | mips_hpt_frequency = clk_get_rate(cpu_clk) / 2; | ||
30 | } | 40 | } |