MIPS: Whitespace cleanup.
[deliverable/linux.git] / arch / mips / loongson1 / common / clock.c
CommitLineData
ca585cf9
KC
1/*
2 * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com>
3 *
70342287
RB
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
ca585cf9
KC
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 */
9
ca585cf9
KC
10#include <linux/clk.h>
11#include <linux/err.h>
ca585cf9 12#include <asm/time.h>
17ded0a8 13#include <platform.h>
ca585cf9
KC
14
15void __init plat_time_init(void)
16{
17 struct clk *clk;
18
19 /* Initialize LS1X clocks */
17ded0a8 20 ls1x_clk_init();
ca585cf9
KC
21
22 /* setup mips r4k timer */
23 clk = clk_get(NULL, "cpu");
24 if (IS_ERR(clk))
69b1803a 25 panic("unable to get cpu clock, err=%ld", PTR_ERR(clk));
ca585cf9
KC
26
27 mips_hpt_frequency = clk_get_rate(clk) / 2;
28}
This page took 0.225528 seconds and 5 git commands to generate.