Loading Documentation/devicetree/bindings/arm/msm/msm_thermal.txt +5 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,9 @@ Optional properties - <consumer_supply_name>-supply = <&phandle_of_regulator>: consumer_supply_name is the name that's defined in thermal driver. phandle_of_regulator is defined by reuglator device tree. - qcom,online-hotplug-core: This property should be defined in targets where KTM should online cores, which are hotplugged due to thermal condition. Optional child nodes - qcom,pmic-opt-curr-temp: Threshold temperature for requesting optimum current (request Loading Loading @@ -251,7 +254,8 @@ Example: qcom,mx-restriction-temp = <5>; qcom,mx-restriction-temp-hysteresis = <10>; qcom,mx-retention-min = <710000>; vdd-mx-supply = <&pma8084_s1> vdd-mx-supply = <&pma8084_s1>; qcom,online-hotplug-core; qcom,vdd-dig-rstr{ qcom,vdd-rstr-reg = "vdd-dig"; Loading drivers/thermal/msm_thermal.c +28 −10 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ static bool gfx_phase_ctrl_enabled; static bool cx_phase_ctrl_enabled; static bool vdd_mx_enabled; static bool therm_reset_enabled; static bool online_core; static int *tsens_id_map; static DEFINE_MUTEX(vdd_rstr_mutex); static DEFINE_MUTEX(psm_mutex); Loading Loading @@ -1363,8 +1364,7 @@ static int __ref update_offline_cores(int val) cpus_offlined = msm_thermal_info.core_control_mask & val; for_each_possible_cpu(cpu) { if (!(cpus_offlined & BIT(cpu))) continue; if (cpus_offlined & BIT(cpu)) { if (!cpu_online(cpu)) continue; ret = cpu_down(cpu); Loading @@ -1373,6 +1373,18 @@ static int __ref update_offline_cores(int val) cpu, ret); else pr_debug("Offlined CPU%d\n", cpu); } else if (online_core) { if (cpu_online(cpu)) continue; ret = cpu_up(cpu); if (ret && ret == notifier_to_errno(NOTIFY_BAD)) pr_debug("Onlining CPU%d is vetoed\n", cpu); else if (ret) pr_err("Unable to online CPU%d. err:%d\n", cpu, ret); else pr_debug("Onlined CPU%d\n", cpu); } } return ret; } Loading Loading @@ -3981,6 +3993,12 @@ static int msm_thermal_dev_probe(struct platform_device *pdev) if (ret) goto fail; key = "qcom,online-hotplug-core"; if (of_property_read_bool(node, key)) online_core = true; else online_core = false; key = "qcom,freq-control-mask"; ret = of_property_read_u32(node, key, &data.bootup_freq_control_mask); Loading Loading
Documentation/devicetree/bindings/arm/msm/msm_thermal.txt +5 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,9 @@ Optional properties - <consumer_supply_name>-supply = <&phandle_of_regulator>: consumer_supply_name is the name that's defined in thermal driver. phandle_of_regulator is defined by reuglator device tree. - qcom,online-hotplug-core: This property should be defined in targets where KTM should online cores, which are hotplugged due to thermal condition. Optional child nodes - qcom,pmic-opt-curr-temp: Threshold temperature for requesting optimum current (request Loading Loading @@ -251,7 +254,8 @@ Example: qcom,mx-restriction-temp = <5>; qcom,mx-restriction-temp-hysteresis = <10>; qcom,mx-retention-min = <710000>; vdd-mx-supply = <&pma8084_s1> vdd-mx-supply = <&pma8084_s1>; qcom,online-hotplug-core; qcom,vdd-dig-rstr{ qcom,vdd-rstr-reg = "vdd-dig"; Loading
drivers/thermal/msm_thermal.c +28 −10 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ static bool gfx_phase_ctrl_enabled; static bool cx_phase_ctrl_enabled; static bool vdd_mx_enabled; static bool therm_reset_enabled; static bool online_core; static int *tsens_id_map; static DEFINE_MUTEX(vdd_rstr_mutex); static DEFINE_MUTEX(psm_mutex); Loading Loading @@ -1363,8 +1364,7 @@ static int __ref update_offline_cores(int val) cpus_offlined = msm_thermal_info.core_control_mask & val; for_each_possible_cpu(cpu) { if (!(cpus_offlined & BIT(cpu))) continue; if (cpus_offlined & BIT(cpu)) { if (!cpu_online(cpu)) continue; ret = cpu_down(cpu); Loading @@ -1373,6 +1373,18 @@ static int __ref update_offline_cores(int val) cpu, ret); else pr_debug("Offlined CPU%d\n", cpu); } else if (online_core) { if (cpu_online(cpu)) continue; ret = cpu_up(cpu); if (ret && ret == notifier_to_errno(NOTIFY_BAD)) pr_debug("Onlining CPU%d is vetoed\n", cpu); else if (ret) pr_err("Unable to online CPU%d. err:%d\n", cpu, ret); else pr_debug("Onlined CPU%d\n", cpu); } } return ret; } Loading Loading @@ -3981,6 +3993,12 @@ static int msm_thermal_dev_probe(struct platform_device *pdev) if (ret) goto fail; key = "qcom,online-hotplug-core"; if (of_property_read_bool(node, key)) online_core = true; else online_core = false; key = "qcom,freq-control-mask"; ret = of_property_read_u32(node, key, &data.bootup_freq_control_mask); Loading