time.c (b74b953b998bcc2db91b694446f3a2619ec32de6) | time.c (0bc6791707694c77b3543de39f77972a65de917a) |
---|---|
1/* 2 * Carsten Langgaard, carstenl@mips.com 3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. 4 * 5 * This program is free software; you can distribute it and/or modify it 6 * under the terms of the GNU General Public License (Version 2) as 7 * published by the Free Software Foundation. 8 * --- 16 unchanged lines hidden (view full) --- 25 26#include <asm/time.h> 27#include <asm/mach-ar7/ar7.h> 28 29void __init plat_time_init(void) 30{ 31 struct clk *cpu_clk; 32 | 1/* 2 * Carsten Langgaard, carstenl@mips.com 3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. 4 * 5 * This program is free software; you can distribute it and/or modify it 6 * under the terms of the GNU General Public License (Version 2) as 7 * published by the Free Software Foundation. 8 * --- 16 unchanged lines hidden (view full) --- 25 26#include <asm/time.h> 27#include <asm/mach-ar7/ar7.h> 28 29void __init plat_time_init(void) 30{ 31 struct clk *cpu_clk; 32 |
33 /* Initialize ar7 clocks so the CPU clock frequency is correct */ 34 ar7_init_clocks(); 35 |
|
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; 40} | 36 cpu_clk = clk_get(NULL, "cpu"); 37 if (IS_ERR(cpu_clk)) { 38 printk(KERN_ERR "unable to get cpu clock\n"); 39 return; 40 } 41 42 mips_hpt_frequency = clk_get_rate(cpu_clk) / 2; 43} |