diff mbox

OMAP3: PM: Fix VDD2 OPP determining logic

Message ID 1242996529-8655-1-git-send-email-ext-roger.quadros@nokia.com (mailing list archive)
State Accepted
Delegated to: Kevin Hilman
Headers show

Commit Message

Roger Quadros May 22, 2009, 12:48 p.m. UTC
The VDD2 OPP table is as per L3 clock rates and not on DPLL2 rate.
So, we use the correct clock rate to calculate the current OPP
for VDD2.

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
---
 arch/arm/mach-omap2/resource34xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c
index 9908e52..d55cc51 100644
--- a/arch/arm/mach-omap2/resource34xx.c
+++ b/arch/arm/mach-omap2/resource34xx.c
@@ -172,6 +172,7 @@  static unsigned short get_opp(struct omap_opp *opp_freq_table,
  */
 void init_opp(struct shared_resource *resp)
 {
+	struct clk *l3_clk;
 	resp->no_of_users = 0;
 
 	if (!mpu_opps || !dsp_opps || !l3_opps)
@@ -190,8 +191,9 @@  void init_opp(struct shared_resource *resp)
 	} else if (strcmp(resp->name, "vdd2_opp") == 0) {
 		vdd2_resp = resp;
 		dpll3_clk = clk_get(NULL, "dpll3_m2_ck");
+		l3_clk = clk_get(NULL, "l3_ick");
 		resp->curr_level = get_opp(l3_opps + MAX_VDD2_OPP,
-				dpll2_clk->rate);
+				l3_clk->rate);
 		curr_vdd2_opp = resp->curr_level;
 	}
 	return;