Commit eabf9e61 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'pm-cpufreq'

* pm-cpufreq:
  Revert "cpufreq: intel_pstate: Process HWP Guaranteed change notification"
  cpufreq: mediatek-hw: Add support for CPUFREQ HW
  cpufreq: Add of_perf_domain_get_sharing_cpumask
  dt-bindings: cpufreq: add bindings for MediaTek cpufreq HW
  cpufreq: Remove ready() callback
  cpufreq: sh: Remove sh_cpufreq_cpu_ready()
  cpufreq: acpi: Remove acpi_cpufreq_cpu_ready()
  cpufreq: qcom-hw: Set dvfs_possible_from_any_cpu cpufreq driver flag
  cpufreq: blocklist more Qualcomm platforms in cpufreq-dt-platdev
  cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support
  cpufreq: scmi: Use .register_em() to register with energy model
  cpufreq: vexpress: Use .register_em() to register with energy model
  cpufreq: scpi: Use .register_em() to register with energy model
  cpufreq: qcom-cpufreq-hw: Use .register_em() to register with energy model
  cpufreq: omap: Use .register_em() to register with energy model
  cpufreq: mediatek: Use .register_em() to register with energy model
  cpufreq: imx6q: Use .register_em() to register with energy model
  cpufreq: dt: Use .register_em() to register with energy model
  cpufreq: Add callback to register with energy model
  cpufreq: vexpress: Set CPUFREQ_IS_COOLING_DEV flag
parents 5cbba605 27de8d59
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -75,9 +75,6 @@ And optionally
 .resume - A pointer to a per-policy resume function which is called
 with interrupts disabled and _before_ the governor is started again.

 .ready - A pointer to a per-policy ready function which is called after
 the policy is fully initialized.

 .attr - A pointer to a NULL-terminated list of "struct freq_attr" which
 allow to export values to sysfs.

+70 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/cpufreq/cpufreq-mediatek-hw.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MediaTek's CPUFREQ Bindings

maintainers:
  - Hector Yuan <hector.yuan@mediatek.com>

description:
  CPUFREQ HW is a hardware engine used by MediaTek SoCs to
  manage frequency in hardware. It is capable of controlling
  frequency for multiple clusters.

properties:
  compatible:
    const: mediatek,cpufreq-hw

  reg:
    minItems: 1
    maxItems: 2
    description:
      Addresses and sizes for the memory of the HW bases in
      each frequency domain. Each entry corresponds to
      a register bank for each frequency domain present.

  "#performance-domain-cells":
    description:
      Number of cells in a performance domain specifier.
      Set const to 1 here for nodes providing multiple
      performance domains.
    const: 1

required:
  - compatible
  - reg
  - "#performance-domain-cells"

additionalProperties: false

examples:
  - |
    cpus {
            #address-cells = <1>;
            #size-cells = <0>;

            cpu0: cpu@0 {
                device_type = "cpu";
                compatible = "arm,cortex-a55";
                enable-method = "psci";
                performance-domains = <&performance 0>;
                reg = <0x000>;
            };
    };

    /* ... */

    soc {
        #address-cells = <2>;
        #size-cells = <2>;

        performance: performance-controller@11bc00 {
            compatible = "mediatek,cpufreq-hw";
            reg = <0 0x0011bc10 0 0x120>, <0 0x0011bd30 0 0x120>;

            #performance-domain-cells = <1>;
        };
    };
+0 −2
Original line number Diff line number Diff line
@@ -80,8 +80,6 @@ CPUfreq核心层注册一个cpufreq_driver结构体。
 .resume - 一个指向per-policy恢复函数的指针,该函数在关中断且在调节器再一次开始前被
 调用。

 .ready - 一个指向per-policy准备函数的指针,该函数在策略完全初始化之后被调用。

 .attr - 一个指向NULL结尾的"struct freq_attr"列表的指针,该函数允许导出值到
 sysfs。

+2 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,
}

DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
EXPORT_PER_CPU_SYMBOL_GPL(cpu_scale);

void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity)
{
@@ -165,6 +166,7 @@ void topology_set_thermal_pressure(const struct cpumask *cpus,
	for_each_cpu(cpu, cpus)
		WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
}
EXPORT_SYMBOL_GPL(topology_set_thermal_pressure);

static ssize_t cpu_capacity_show(struct device *dev,
				 struct device_attribute *attr,
+12 −0
Original line number Diff line number Diff line
@@ -133,6 +133,18 @@ config ARM_MEDIATEK_CPUFREQ
	help
	  This adds the CPUFreq driver support for MediaTek SoCs.

config ARM_MEDIATEK_CPUFREQ_HW
	tristate "MediaTek CPUFreq HW driver"
	depends on ARCH_MEDIATEK || COMPILE_TEST
	default m
	help
	  Support for the CPUFreq HW driver.
	  Some MediaTek chipsets have a HW engine to offload the steps
	  necessary for changing the frequency of the CPUs. Firmware loaded
	  in this engine exposes a programming interface to the OS.
	  The driver implements the cpufreq interface for this HW engine.
	  Say Y if you want to support CPUFreq HW.

config ARM_OMAP2PLUS_CPUFREQ
	bool "TI OMAP2+"
	depends on ARCH_OMAP2PLUS
Loading