From 9b724797830673073147e91370cd521653b06f27 Mon Sep 17 00:00:00 2001 From: Vikram Pandita Date: Wed, 4 Jul 2012 05:00:44 -0600 Subject: [PATCH] --- yaml --- r: 313387 b: refs/heads/master c: 55ffe163c8b4e2aa0a083000e02ec26efd71ea63 h: refs/heads/master i: 313385: 82117830e25b227f197ab3fa140414b9a8d62886 313383: 5f4683cf3641397557ee12b9694151a91c23ebe2 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/dpll3xxx.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5c754e28916f..5a9143efee1e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f0d3d821db4ffa63de344347587429b940086e25 +refs/heads/master: 55ffe163c8b4e2aa0a083000e02ec26efd71ea63 diff --git a/trunk/arch/arm/mach-omap2/dpll3xxx.c b/trunk/arch/arm/mach-omap2/dpll3xxx.c index f0f10beeffe8..c310dc0d40b4 100644 --- a/trunk/arch/arm/mach-omap2/dpll3xxx.c +++ b/trunk/arch/arm/mach-omap2/dpll3xxx.c @@ -135,11 +135,20 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n) */ static int _omap3_noncore_dpll_lock(struct clk *clk) { + const struct dpll_data *dd; u8 ai; - int r; + u8 state = 1; + int r = 0; pr_debug("clock: locking DPLL %s\n", clk->name); + dd = clk->dpll_data; + state <<= __ffs(dd->idlest_mask); + + /* Check if already locked */ + if ((__raw_readl(dd->idlest_reg) & dd->idlest_mask) == state) + goto done; + ai = omap3_dpll_autoidle_read(clk); if (ai) @@ -152,6 +161,7 @@ static int _omap3_noncore_dpll_lock(struct clk *clk) if (ai) omap3_dpll_allow_idle(clk); +done: return r; }