blob: 91e842b58365f8c3c527d6134f2e2f830bde5295 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Wu Zhangjinbd92aa02009-07-02 23:22:36 +08002/*
3 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
4 * Author: Fuxin Zhang, zhangfx@lemote.com
5 *
Wu Zhangjinf7a904d2010-01-04 17:16:51 +08006 * Copyright (C) 2009 Lemote Inc.
7 * Author: Wu Zhangjin, wuzhangjin@gmail.com
Wu Zhangjinbd92aa02009-07-02 23:22:36 +08008 */
Jiaxun Yanga746f502020-04-20 21:45:25 +08009
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080010#include <asm/time.h>
Huacai Chene292ccd2014-11-04 14:15:31 +080011#include <asm/hpet.h>
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080012
Wu Zhangjin5e983ff2009-07-02 23:23:03 +080013#include <loongson.h>
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080014
15void __init plat_time_init(void)
16{
17 /* setup mips r4k timer */
18 mips_hpt_frequency = cpu_clock_freq / 2;
Wu Zhangjin916daba2009-11-17 01:32:57 +080019
Huacai Chene292ccd2014-11-04 14:15:31 +080020#ifdef CONFIG_RS780_HPET
21 setup_hpet_timer();
Huacai Chene292ccd2014-11-04 14:15:31 +080022#endif
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080023}