// SPDX-License-Identifier: GPL-2.0-or-later1/*2* Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology3* Author: Fuxin Zhang, [email protected]4*5* Copyright (C) 2009 Lemote Inc.6* Author: Wu Zhangjin, [email protected]7*/8#include <asm/mc146818-time.h>9#include <asm/time.h>10#include <asm/hpet.h>1112#include <loongson.h>13#include <cs5536/cs5536_mfgpt.h>1415void __init plat_time_init(void)16{17/* setup mips r4k timer */18mips_hpt_frequency = cpu_clock_freq / 2;1920setup_mfgpt0_timer();21}2223void read_persistent_clock64(struct timespec64 *ts)24{25ts->tv_sec = mc146818_get_cmos_time();26ts->tv_nsec = 0;27}282930