> -----Original Message----- > From: K, Ambresh > Sent: Wednesday, March 10, 2010 12:38 PM > To: Gurav , Pramod > Cc: K, Ambresh; Reddy, Teerth; linux-omap@xxxxxxxxxxxxxxx; Sripathy, > Vishwanath; Paul Walmsley; Kevin Hilman; Kandasamy, Rajkumar > Subject: Re: [PATCH RFC]OMAP3:PM:Dynamic Calculation of SDRC stall latency > during DVFS Hello Ambresh, > > > We can get ride of the steps used to calculate CLKOUTX2, by simply > calling parent's (dpll3_ck) clk->recalc function pointer. > > recalc function will return CLKOUT, so CLKOUTX2 = CLKOUT * 2. > > pseudo code > ------------ > struct clk *parent = clk->parent; > clkout = parent->recalc(); > clkoutx2 = clkout * 2; > I will test this and update the patch if works fine. > To derive REFCLK. the only unknown parameter will be N, which can be > read from .clksel_reg. > > Why can't we use do_div() api to calculate REFCLK, instead of manual > calculation? > This should hold good for 3430 formula. I am also modifying the code to get 3630 formula included for DVFS latency calculation. But, I am not sure whether using do_div() takes care of truncation (fraction part) as the 3630 formula gives very small value (Need to converted to nano seconds). -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html