0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/init.h>
0010 #include <linux/time.h>
0011 #include <linux/err.h>
0012 #include <linux/clk.h>
0013
0014 #include <asm/time.h>
0015 #include <asm/mach-ar7/ar7.h>
0016
0017 void __init plat_time_init(void)
0018 {
0019 struct clk *cpu_clk;
0020
0021
0022 ar7_init_clocks();
0023
0024 cpu_clk = clk_get(NULL, "cpu");
0025 if (IS_ERR(cpu_clk)) {
0026 printk(KERN_ERR "unable to get cpu clock\n");
0027 return;
0028 }
0029
0030 mips_hpt_frequency = clk_get_rate(cpu_clk) / 2;
0031 }