Hello, When trying to make "vdd2_opp" resource to "VDD2_OPP3" level using "resource_request"(arch\arm\plat-omap\resource.c), it is observed that vdd2_opp is always put to VDD2_OPP2 level.
Code Snippet: For the above, set_opp() in arch\arm\mach-omap2\resource34xx.c is called with a target level of 3. The code flow is as given below: /*********************** Code Snippet Start****************************/ else if (resp == vdd2_resp) { tput = target_level; /* Convert the tput in KiB/s to Bus frequency in MHz */ req_l3_freq = (tput * 1000)/4; for (ind = 2; ind <= MAX_VDD2_OPP; ind++){ if ((l3_opps + ind)->rate >= req_l3_freq) { target_level = ind; break; } } /* Set the highest OPP possible */ if (ind > MAX_VDD2_OPP) target_level = ind-1; resource_set_opp_level(VDD2_OPP, target_level, 0); } /*********************** Code Snippet End****************************/ Analysis: During execution, tout = 3; req_l3_freq = 750; when ind = 2, if ((l3_opps + ind)->rate >= req_l3_freq) ==> (83M > 750) which in turn makes target_level = 2. Hence while requesting for target_level of 3, vdd2_opp is made to target_level = 2, which is incorrect. Issues observed: The above code should have been made for mapping L3 freq 83MHz to VDD2_OPP2 and L3 freq 166MHz to VDD2_OPP3. But the above code would always make vdd2_opp to VDD2_OPP2 level. However, it is observed that, if we change the vdd2_opp to 3 using sysfs, it seems to be setting to level 3. I am wondering if there are any issues with sysfs entries since same is working with resource frame work API's. Please let me know if my understanding is wrong. Thanks & Regards, V Charu Latha-- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html