openwrtv4/target/linux/adm8668/files-3.18/arch/mips/adm8668/time.c
Florian Fainelli f51f3ee9bc adm8668: add 3.18 support
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 45094
2015-03-28 18:18:38 +00:00

20 lines
350 B
C

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/clk.h>
#include <asm/time.h>
#include <adm8668.h>
void __init plat_time_init(void)
{
struct clk *sys_clk;
adm8668_init_clocks();
sys_clk = clk_get(NULL, "sys");
if (IS_ERR(sys_clk))
panic("unable to get system clock\n");
mips_hpt_frequency = clk_get_rate(sys_clk) / 2;
}