diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/mips/ar7/time.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
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 | } |