xref: /OK3568_Linux_fs/kernel/arch/mips/loongson64/time.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-or-later
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
4*4882a593Smuzhiyun  * Author: Fuxin Zhang, zhangfx@lemote.com
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Copyright (C) 2009 Lemote Inc.
7*4882a593Smuzhiyun  * Author: Wu Zhangjin, wuzhangjin@gmail.com
8*4882a593Smuzhiyun  */
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <asm/time.h>
11*4882a593Smuzhiyun #include <asm/hpet.h>
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #include <loongson.h>
14*4882a593Smuzhiyun 
plat_time_init(void)15*4882a593Smuzhiyun void __init plat_time_init(void)
16*4882a593Smuzhiyun {
17*4882a593Smuzhiyun 	/* setup mips r4k timer */
18*4882a593Smuzhiyun 	mips_hpt_frequency = cpu_clock_freq / 2;
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #ifdef CONFIG_RS780_HPET
21*4882a593Smuzhiyun 	setup_hpet_timer();
22*4882a593Smuzhiyun #endif
23*4882a593Smuzhiyun }
24