1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-02-08 13:21:56 +02:00
florian a2565ae2b4 [adm8668] provide a system clock to be used by the MIPS timer
Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34550 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-12-06 22:39:52 +00:00

21 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;
}