Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372320
b: refs/heads/master
c: a7990a1
h: refs/heads/master
v: v3
  • Loading branch information
Jon Hunter committed Apr 1, 2013
1 parent 68a67f3 commit f61b9c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e95ea43a90c32ccb47a601c70203ff60c0c1f345
refs/heads/master: a7990a1952cbaea0971272692f69f62906446fdf
27 changes: 14 additions & 13 deletions trunk/arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
struct device_node *np;
struct omap_hwmod *oh;
struct resource irq, mem;
struct clk *src;
int r = 0;

if (of_have_populated_dt()) {
Expand Down Expand Up @@ -279,24 +280,24 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
/* After the dmtimer is using hwmod these clocks won't be needed */
timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
if (IS_ERR(timer->fclk))
return -ENODEV;
return PTR_ERR(timer->fclk);

src = clk_get(NULL, fck_source);
if (IS_ERR(src))
return PTR_ERR(src);

/* FIXME: Need to remove hard-coded test on timer ID */
if (gptimer_id != 12) {
struct clk *src;

src = clk_get(NULL, fck_source);
if (IS_ERR(src)) {
r = -EINVAL;
} else {
r = clk_set_parent(timer->fclk, src);
if (r < 0)
pr_warn("%s: %s cannot set source\n",
__func__, oh->name);
if (clk_get_parent(timer->fclk) != src) {
r = clk_set_parent(timer->fclk, src);
if (r < 0) {
pr_warn("%s: %s cannot set source\n", __func__,
oh->name);
clk_put(src);
return r;
}
}

clk_put(src);

omap_hwmod_setup_one(oh_name);
omap_hwmod_enable(oh);
__omap_dm_timer_init_regs(timer);
Expand Down

0 comments on commit f61b9c8

Please sign in to comment.