driver: thermal: msm_thermal: Enable Reliability algorithm

The reliability algorithm has a dependency for OSM to be initialized
before it is enabled.

Enable reliability algorithm in the LMH DCVSh hardware for both the
clusters from KTM. KTM is enabled, only after OSM populates the OPP
table. So this solves the dependency.

Change-Id: I4a382915a6c3a6b9d445ec1f5d57fb499a011f1a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
This commit is contained in:
Ram Chandrasekar 2016-11-14 10:56:27 -07:00
parent 24d0c1f91e
commit 73a2595feb

View file

@ -60,6 +60,7 @@
#define MSM_LIMITS_NODE_DCVS 0x44435653
#define MSM_LIMITS_SUB_FN_GENERAL 0x47454E00
#define MSM_LIMITS_SUB_FN_CRNT 0x43524E54
#define MSM_LIMITS_SUB_FN_REL 0x52454C00
#define MSM_LIMITS_DOMAIN_MAX 0x444D4158
#define MSM_LIMITS_DOMAIN_MIN 0x444D494E
#define MSM_LIMITS_CLUSTER_0 0x6370302D
@ -1674,7 +1675,20 @@ static int msm_thermal_lmh_dcvs_init(struct platform_device *pdev)
*/
devm_clk_put(&pdev->dev, osm_clk);
/* Enable the CRNT algorithm. Again, we dont care if this fails */
/* Enable the CRNT and Reliability algorithm. Again, we dont
* care if this fails
*/
ret = msm_lmh_dcvs_write(MSM_LIMITS_CLUSTER_0,
MSM_LIMITS_SUB_FN_REL,
MSM_LIMITS_ALGO_MODE_ENABLE, 1);
if (ret)
pr_err("Unable to enable REL algo for cluster0\n");
ret = msm_lmh_dcvs_write(MSM_LIMITS_CLUSTER_1,
MSM_LIMITS_SUB_FN_REL,
MSM_LIMITS_ALGO_MODE_ENABLE, 1);
if (ret)
pr_err("Unable to enable REL algo for cluster1\n");
ret = msm_lmh_dcvs_write(MSM_LIMITS_CLUSTER_0,
MSM_LIMITS_SUB_FN_CRNT,
MSM_LIMITS_ALGO_MODE_ENABLE, 1);