On Thu, Mar 18, 2010 at 07:44:51PM +0100, ext Nishanth Menon wrote:
@@ -131,5 +133,16 @@ void __init omap3_pm_init_opp_table(void)
r |= opp_init_list(OPP_L3, omap3_opp_def_list[1]);
r |= opp_init_list(OPP_DSP, omap3_opp_def_list[2]);
BUG_ON(r);
+
+ /* First get the l3 thresh from highest l3 opp */
+ freq = ULONG_MAX;
+ opp = opp_find_freq_floor(OPP_L3, &freq);
+ l3_thresh = freq * 4 / 1000;
+ /* Now setup the L3 bandwidth restrictions for right mpu freqs */
+ freq = cpu_is_omap3630() ? 500000000 : 600000000;
I also don't like this. Don't you have somewhere else you could pick ?
+ while (!IS_ERR(opp = opp_find_freq_ceil(OPP_MPU, &freq))) {
+ opp_store_data(opp, "l3thresh", (void *) l3_thresh);
+ freq++;
+ }
this is a good example of what I mean. Instead of saving l3_thresh, why
don't you group all those data in a structure (which could even be
defined per-cpu really, you already have cpufreq34xx, so you could have
cpufreq24xx 36xx 44xx, etc) and just store that in a void * ??
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html