drm/rockchip: vop2: Fix the windows switch between different layers
[drm/drm-misc.git] / arch / mips / loongson32 / common / time.c
blob74ad2b17918d2deb893895fc6d9a1b7f3a083df4
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (c) 2014 Zhang, Keguang <keguang.zhang@gmail.com>
4 */
6 #include <linux/clk.h>
7 #include <linux/of_clk.h>
8 #include <asm/time.h>
10 void __init plat_time_init(void)
12 struct clk *clk = NULL;
14 /* initialize LS1X clocks */
15 of_clk_init(NULL);
17 /* setup mips r4k timer */
18 clk = clk_get(NULL, "cpu_clk");
19 if (IS_ERR(clk))
20 panic("unable to get cpu clock, err=%ld", PTR_ERR(clk));
22 mips_hpt_frequency = clk_get_rate(clk) / 2;