aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/timer-prima2.c
diff options
context:
space:
mode:
authorZhiwu Song <Zhiwu.Song@csr.com>2014-05-05 07:30:04 -0400
committerBarry Song <Baohua.Song@csr.com>2014-05-12 09:43:49 -0400
commitc7cff54d5926e3f419c23eff2ebaf6f5e12da05d (patch)
treef5070d37732decf324f11f426f4c2c4c87239066 /drivers/clocksource/timer-prima2.c
parent7caf6852018a7550a2451972522688caef350549 (diff)
clocksource:sirf: remove the hardcode for the clk of timers
Nobody want to know the connection between io clk and timer clk, so exposing this information to timer module is not reasonable. this patch moves to define the timers' clk in dt. Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com>
Diffstat (limited to 'drivers/clocksource/timer-prima2.c')
-rw-r--r--drivers/clocksource/timer-prima2.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c
index 84fdb15eae79..a722aac7ac02 100644
--- a/drivers/clocksource/timer-prima2.c
+++ b/drivers/clocksource/timer-prima2.c
@@ -198,11 +198,8 @@ static void __init sirfsoc_prima2_timer_init(struct device_node *np)
198 unsigned long rate; 198 unsigned long rate;
199 struct clk *clk; 199 struct clk *clk;
200 200
201 /* timer's input clock is io clock */ 201 clk = of_clk_get(np, 0);
202 clk = clk_get_sys("io", NULL);
203
204 BUG_ON(IS_ERR(clk)); 202 BUG_ON(IS_ERR(clk));
205
206 rate = clk_get_rate(clk); 203 rate = clk_get_rate(clk);
207 204
208 BUG_ON(rate < PRIMA2_CLOCK_FREQ); 205 BUG_ON(rate < PRIMA2_CLOCK_FREQ);