1 // SPDX-License-Identifier: GPL-2.0-only
3 * Carsten Langgaard, carstenl@mips.com
4 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
6 * Setting up the clock on the MIPS boards.
9 #include <linux/init.h>
10 #include <linux/time.h>
11 #include <linux/err.h>
12 #include <linux/clk.h>
15 #include <asm/mach-ar7/ar7.h>
17 void __init
plat_time_init(void)
21 /* Initialize ar7 clocks so the CPU clock frequency is correct */
24 cpu_clk
= clk_get(NULL
, "cpu");
25 if (IS_ERR(cpu_clk
)) {
26 printk(KERN_ERR
"unable to get cpu clock\n");
30 mips_hpt_frequency
= clk_get_rate(cpu_clk
) / 2;