Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303387
b: refs/heads/master
c: d76316f
h: refs/heads/master
i:
  303385: 8719088
  303383: 1cb6985
v: v3
  • Loading branch information
Vaibhav Bedia authored and Paul Walmsley committed May 8, 2012
1 parent 283e866 commit 2a93baa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 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: f1bbbb1365fdb1abe29f31d4ac455f265f9bc2ff
refs/heads/master: d76316fef3f2ecec210b78a38263a06bb4f6c1b9
23 changes: 18 additions & 5 deletions trunk/arch/arm/mach-omap2/dpll3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)

ai = omap3_dpll_autoidle_read(clk);

omap3_dpll_deny_idle(clk);
if (ai)
omap3_dpll_deny_idle(clk);

_omap3_dpll_write_clken(clk, DPLL_LOCKED);

Expand Down Expand Up @@ -186,8 +187,6 @@ static int _omap3_noncore_dpll_bypass(struct clk *clk)

if (ai)
omap3_dpll_allow_idle(clk);
else
omap3_dpll_deny_idle(clk);

return r;
}
Expand Down Expand Up @@ -216,8 +215,6 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)

if (ai)
omap3_dpll_allow_idle(clk);
else
omap3_dpll_deny_idle(clk);

return 0;
}
Expand Down Expand Up @@ -519,6 +516,9 @@ u32 omap3_dpll_autoidle_read(struct clk *clk)

dd = clk->dpll_data;

if (!dd->autoidle_reg)
return -EINVAL;

v = __raw_readl(dd->autoidle_reg);
v &= dd->autoidle_mask;
v >>= __ffs(dd->autoidle_mask);
Expand All @@ -545,6 +545,12 @@ void omap3_dpll_allow_idle(struct clk *clk)

dd = clk->dpll_data;

if (!dd->autoidle_reg) {
pr_debug("clock: DPLL %s: autoidle not supported\n",
clk->name);
return;
}

/*
* REVISIT: CORE DPLL can optionally enter low-power bypass
* by writing 0x5 instead of 0x1. Add some mechanism to
Expand All @@ -554,6 +560,7 @@ void omap3_dpll_allow_idle(struct clk *clk)
v &= ~dd->autoidle_mask;
v |= DPLL_AUTOIDLE_LOW_POWER_STOP << __ffs(dd->autoidle_mask);
__raw_writel(v, dd->autoidle_reg);

}

/**
Expand All @@ -572,6 +579,12 @@ void omap3_dpll_deny_idle(struct clk *clk)

dd = clk->dpll_data;

if (!dd->autoidle_reg) {
pr_debug("clock: DPLL %s: autoidle not supported\n",
clk->name);
return;
}

v = __raw_readl(dd->autoidle_reg);
v &= ~dd->autoidle_mask;
v |= DPLL_AUTOIDLE_DISABLE << __ffs(dd->autoidle_mask);
Expand Down

0 comments on commit 2a93baa

Please sign in to comment.