diff options
38 files changed, 124 insertions, 178 deletions
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt index dd3929e85dec..332aed8f4597 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt | |||
| @@ -18,8 +18,6 @@ Optional properties: | |||
| 18 | in unit of nanoseconds. | 18 | in unit of nanoseconds. |
| 19 | - voltage-tolerance: Specify the CPU voltage tolerance in percentage. | 19 | - voltage-tolerance: Specify the CPU voltage tolerance in percentage. |
| 20 | - #cooling-cells: | 20 | - #cooling-cells: |
| 21 | - cooling-min-level: | ||
| 22 | - cooling-max-level: | ||
| 23 | Please refer to Documentation/devicetree/bindings/thermal/thermal.txt. | 21 | Please refer to Documentation/devicetree/bindings/thermal/thermal.txt. |
| 24 | 22 | ||
| 25 | Examples: | 23 | Examples: |
| @@ -40,8 +38,6 @@ cpus { | |||
| 40 | >; | 38 | >; |
| 41 | clock-latency = <61036>; /* two CLK32 periods */ | 39 | clock-latency = <61036>; /* two CLK32 periods */ |
| 42 | #cooling-cells = <2>; | 40 | #cooling-cells = <2>; |
| 43 | cooling-min-level = <0>; | ||
| 44 | cooling-max-level = <2>; | ||
| 45 | }; | 41 | }; |
| 46 | 42 | ||
| 47 | cpu@1 { | 43 | cpu@1 { |
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt index f6403089edcf..d36f07e0a2bb 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | |||
| @@ -21,8 +21,6 @@ Optional properties: | |||
| 21 | flow is handled by hardware, hence no software "voltage tracking" is | 21 | flow is handled by hardware, hence no software "voltage tracking" is |
| 22 | needed. | 22 | needed. |
| 23 | - #cooling-cells: | 23 | - #cooling-cells: |
| 24 | - cooling-min-level: | ||
| 25 | - cooling-max-level: | ||
| 26 | Please refer to Documentation/devicetree/bindings/thermal/thermal.txt | 24 | Please refer to Documentation/devicetree/bindings/thermal/thermal.txt |
| 27 | for detail. | 25 | for detail. |
| 28 | 26 | ||
| @@ -67,8 +65,6 @@ Example 1 (MT7623 SoC): | |||
| 67 | clock-names = "cpu", "intermediate"; | 65 | clock-names = "cpu", "intermediate"; |
| 68 | operating-points-v2 = <&cpu_opp_table>; | 66 | operating-points-v2 = <&cpu_opp_table>; |
| 69 | #cooling-cells = <2>; | 67 | #cooling-cells = <2>; |
| 70 | cooling-min-level = <0>; | ||
| 71 | cooling-max-level = <7>; | ||
| 72 | }; | 68 | }; |
| 73 | cpu@1 { | 69 | cpu@1 { |
| 74 | device_type = "cpu"; | 70 | device_type = "cpu"; |
diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index b750da5362f7..8e7c65464c9d 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi | |||
| @@ -87,8 +87,6 @@ | |||
| 87 | clock-names = "cpu", "intermediate"; | 87 | clock-names = "cpu", "intermediate"; |
| 88 | operating-points-v2 = <&cpu_opp_table>; | 88 | operating-points-v2 = <&cpu_opp_table>; |
| 89 | #cooling-cells = <2>; | 89 | #cooling-cells = <2>; |
| 90 | cooling-min-level = <0>; | ||
| 91 | cooling-max-level = <7>; | ||
| 92 | clock-frequency = <1300000000>; | 90 | clock-frequency = <1300000000>; |
| 93 | }; | 91 | }; |
| 94 | 92 | ||
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index fb586e09682d..833b5f41f596 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm | |||
| @@ -45,6 +45,7 @@ config ARM_DT_BL_CPUFREQ | |||
| 45 | config ARM_SCPI_CPUFREQ | 45 | config ARM_SCPI_CPUFREQ |
| 46 | tristate "SCPI based CPUfreq driver" | 46 | tristate "SCPI based CPUfreq driver" |
| 47 | depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI | 47 | depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI |
| 48 | depends on !CPU_THERMAL || THERMAL | ||
| 48 | help | 49 | help |
| 49 | This adds the CPUfreq driver support for ARM platforms using SCPI | 50 | This adds the CPUfreq driver support for ARM platforms using SCPI |
| 50 | protocol for CPU power management. | 51 | protocol for CPU power management. |
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index d0c34df0529c..9449657d72f0 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
| @@ -794,15 +794,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
| 794 | valid_states++; | 794 | valid_states++; |
| 795 | } | 795 | } |
| 796 | freq_table[valid_states].frequency = CPUFREQ_TABLE_END; | 796 | freq_table[valid_states].frequency = CPUFREQ_TABLE_END; |
| 797 | policy->freq_table = freq_table; | ||
| 797 | perf->state = 0; | 798 | perf->state = 0; |
| 798 | 799 | ||
| 799 | result = cpufreq_table_validate_and_show(policy, freq_table); | ||
| 800 | if (result) | ||
| 801 | goto err_freqfree; | ||
| 802 | |||
| 803 | if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) | ||
| 804 | pr_warn(FW_WARN "P-state 0 is not max freq\n"); | ||
| 805 | |||
| 806 | switch (perf->control_register.space_id) { | 800 | switch (perf->control_register.space_id) { |
| 807 | case ACPI_ADR_SPACE_SYSTEM_IO: | 801 | case ACPI_ADR_SPACE_SYSTEM_IO: |
| 808 | /* | 802 | /* |
| @@ -842,8 +836,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
| 842 | 836 | ||
| 843 | return result; | 837 | return result; |
| 844 | 838 | ||
| 845 | err_freqfree: | ||
| 846 | kfree(freq_table); | ||
| 847 | err_unreg: | 839 | err_unreg: |
| 848 | acpi_processor_unregister_performance(cpu); | 840 | acpi_processor_unregister_performance(cpu); |
| 849 | err_free_mask: | 841 | err_free_mask: |
| @@ -871,6 +863,15 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) | |||
| 871 | return 0; | 863 | return 0; |
| 872 | } | 864 | } |
| 873 | 865 | ||
| 866 | static void acpi_cpufreq_cpu_ready(struct cpufreq_policy *policy) | ||
| 867 | { | ||
| 868 | struct acpi_processor_performance *perf = per_cpu_ptr(acpi_perf_data, | ||
| 869 | policy->cpu); | ||
| 870 | |||
| 871 | if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) | ||
| 872 | pr_warn(FW_WARN "P-state 0 is not max freq\n"); | ||
| 873 | } | ||
| 874 | |||
| 874 | static int acpi_cpufreq_resume(struct cpufreq_policy *policy) | 875 | static int acpi_cpufreq_resume(struct cpufreq_policy *policy) |
| 875 | { | 876 | { |
| 876 | struct acpi_cpufreq_data *data = policy->driver_data; | 877 | struct acpi_cpufreq_data *data = policy->driver_data; |
| @@ -898,6 +899,7 @@ static struct cpufreq_driver acpi_cpufreq_driver = { | |||
| 898 | .bios_limit = acpi_processor_get_bios_limit, | 899 | .bios_limit = acpi_processor_get_bios_limit, |
| 899 | .init = acpi_cpufreq_cpu_init, | 900 | .init = acpi_cpufreq_cpu_init, |
| 900 | .exit = acpi_cpufreq_cpu_exit, | 901 | .exit = acpi_cpufreq_cpu_exit, |
| 902 | .ready = acpi_cpufreq_cpu_ready, | ||
| 901 | .resume = acpi_cpufreq_resume, | 903 | .resume = acpi_cpufreq_resume, |
| 902 | .name = "acpi-cpufreq", | 904 | .name = "acpi-cpufreq", |
| 903 | .attr = acpi_cpufreq_attr, | 905 | .attr = acpi_cpufreq_attr, |
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index c56b57dcfda5..1d7ef5fc1977 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c | |||
| @@ -483,14 +483,7 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy) | |||
| 483 | if (ret) | 483 | |
